Is there a way to make your own warnings when a child or value is missing?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By peterhoglund

In the Scene view some built in nodes show warnings if a specific child or value is missing. Can you set this up your self from code? And how would you do that if it is possible?

Example of warning

:bust_in_silhouette: Reply From: jgodfrey

I never done it, but it looks like it’s possible. See this article:

:bust_in_silhouette: Reply From: Jorge

Hi try to use:

func _get_configuration_warning()
return “Text warning” if …

an example form a tutorial, they need to call a function(by pressing a button) to change the level but the level needs to be uploaded on the variable in the inspector.

func _on_button_up() → void:

func _get_configuration_warning() → String:
return “The property Next Level can’t be empty” if next_scene_path == “” else “”

the tutorial on divided in 3 parts and is on YouTube, don’t remember which one was, hope it helps.