Showing the alert icon in the editor's scene tree

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

I’m building a plugin and I want one of my custom nodes to show the warning sign when some of the properties are not set properly.

Is there any way to do that?

:bust_in_silhouette: Reply From: volzhs

There is a virtual method Node::get_configuration_warning in cpp.
but it’s not exposed to gdscript.

I’m not sure if there is any workaround for it.
you can open issue and discuss about this on github.

I opened the issue!

Blaise Bernier | 2018-05-03 00:55

:bust_in_silhouette: Reply From: Dlean Jeans

As of 3.1 you can do this by adding _get_configuration_warning to your GDScript:

tool # must be a tool script to work
extends Node

export(String) var name:String

func _get_configuration_warning():
	if not name:
		return 'Name not set'
	return ''
1 Like