• 2D
  • Export a node or viewport to png

Hi there, this is my first post :) I would like to export from code what my 2D godot scene is rendering (even better just a canvas layer or node). Is that possible ? I saw a command save_png for the image class, but i dunno how to convert my scene to an image. Do you have any useful suggestion ? Thanks in advance :)

Thanks, it seems useful indeed :) get_viewport().queue_screen_capture() and get_viewport().get_screen_capture() are my friends !

Nice! If the suggestion was acceptable, could you please mark "yes" on "Did this answer the question" just below the answer?

Thanks :)

Sure, gimme please one day or 2 to check, and i will mark this post as solved :)

16 days later