Filter nodes in Inspector NodePath dialog by type/class. This is an attempt to solve this godotengine/godot-proposals#934
Say you have export (NodePath) var control_path
. This node should be Control
Then all you need is to create property named control
(that is same as control_path
but without _path
) and specify the type:
var control:Control
Now only Control
nodes can be selected in NodePath dialog.
There is also a setting in EditorSettings
(me2beats_plugins/nodepath_filter/include_derived_classes) to allow selecting Nodes of derived (child) clases (in this case, not only Controls but also Containers etc, but still not Nodes).
- when enabling the plugin (and in some other cases), you should change node selection to make it work.
- currently works only for GDScript