Dragging shader into material slot or making changes to a shader makes object turn black

While I have not run into this specific issue, I did run into a very similar one.

I recommend not defining a material for any shader you are using in a class. Instead, create the material when you create the object from the class. This means you also need to define the shader on creation - but it is fairly simple to do.

@onready var sprite: Sprite2D = %Sprite
@onready var fire_shader: Shader = preload(ShadersMap.BUILDING_FIRE)


# Called from _ready()
sprite.material = ShaderMaterial.new()
sprite.material.shader = fire_shader