How to load in texture prior to runtime with custom resources

Godot Version

4.4.1

Question

Hello, I currently have one enemy node, with custom resources that dictate different enemy primitive variables as well as the hitbox and texture. However, since the texture and hitbox are loaded in when each instance is created, there is no texture displayed when in the editor/viewport. How can I have unique textures displayed when editing scenes and also decouple the texture from the enemy node (thereby allowing abstraction for easy enemy creation). Are custom resources for textures even the right way to go about this? I can provide more details or images if needed. Thank you!

You’ll need to use a @tool script to be able to change the texture in the editor.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.