This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

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

in Engine by (57 points)

2 Answers

+1 vote

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

by (22,704 points)
0 votes

Hi try to use:

func getconfiguration_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 onbuttonup() -> void:

func getconfigurationwarning() -> 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.

by (194 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.