Loading External Images in Godot

How to Load External Images at Run Time in the Godot Game Engine.

Loading non-imported, external resources in the Godot Game Engine requires you to replicate the import process at run-time first (which is already done in the editor).

Then store a reference to the loaded resource somewhere for it to be accessed later, so it’s not possible to use load() for those resources, because they were not actually imported, but created at run-time instead. Which is pretty confusing.

You can’t use load() you instead need to used load_png_from_buffer() which asked for a buffer, which a pool byte array of the size of the file in bytes.

watch on youtube

Play the Game

Check out the FPS Template


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *