Hello, I'm writing a simple spawner (a Node with a child Timer), and I want to display an error when the user hasn't provided the entity to spawn. I have written up a _get_configuration_warnings function (see below), but it doesn't have any effect. I want it to give a warning similar to CharacterBody2D.
The spawner is not a @tool, because its a gameplay element, not an editor script.
@export var to_spawn: PackedScene :
set(value):
to_spawn = value;
update_configuration_warnings();
func _get_configuration_warnings() -> PackedStringArray:
var ret = [];
if not to_spawn:
ret.append("Entity to spawn required.")
return ret;
func _on_timer_timeout() -> void:
# game logic