Describe the problem or limitation you are having in your project
I have a node that marks a 'grab point' on an interactable, and I would like a cleaner way to visualize these in the editor.
How I am doing this currently:
I have a scene with the grab point script on the root, and a meshinstance as a child of that, with the mesh set to a model of a hand.
I can toggle a custom 'visible' property on the grab point to set the visibility of this hand. This helps me position the grab points where I want them in the editor easily.
I want this to only be visible within the editor, regardless of if I left Show Visual on, and to have the node for the visual be removed from builds as it is not needed.
I can remove the node on spawn in builds, but if it's intended for the editor, why spawn it in builds at all?
I think there should be a built in way to do this.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Editor only nodes would be a clean way to help people quickly create their own helper visuals for the editor.
This proposal is asking for something similar, but for 2D sprites. https://github.com/godotengine/godot-proposals/issues/11105
I propose being able to mark a node as being editor or debug only, and this would work for all types of nodes.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
A new enum property would be added to Node with three options:
Everywhere: The default option. The node exists, is visible, and processes like it usually does.
Debug: Exists, but only visible/processible if an option is enabled.
Editor Only / Remove from builds: Node will not exist at all within built projects.
The editor would also have a new option under the Debug tab that would allow creating debug nodes, similar to how you can enable collision shape visibility when running from the editor.
The Editor Only option of this enum for all nodes would also replace the Editor Only checkbox for lights.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Yes.
extends Node
func _ready() -> void:
if not OS.get_cmdline_args().has("--debug-nodes"):
print('Removing debug node %s' % get_path())
queue_free()
Is there a reason why this should be core and not an add-on in the asset library?
A built in option to mark a node as an editor or debug node would be a convenient feature.
Describe the project you are working on
A VR game with grabbable objects.
Describe the problem or limitation you are having in your project
I have a node that marks a 'grab point' on an interactable, and I would like a cleaner way to visualize these in the editor.
How I am doing this currently:
I have a scene with the grab point script on the root, and a meshinstance as a child of that, with the mesh set to a model of a hand. I can toggle a custom 'visible' property on the grab point to set the visibility of this hand. This helps me position the grab points where I want them in the editor easily.
I want this to only be visible within the editor, regardless of if I left Show Visual on, and to have the node for the visual be removed from builds as it is not needed.
I can remove the node on spawn in builds, but if it's intended for the editor, why spawn it in builds at all? I think there should be a built in way to do this.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Editor only nodes would be a clean way to help people quickly create their own helper visuals for the editor. This proposal is asking for something similar, but for 2D sprites. https://github.com/godotengine/godot-proposals/issues/11105 I propose being able to mark a node as being editor or debug only, and this would work for all types of nodes.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
A new enum property would be added to Node with three options:
The editor would also have a new option under the Debug tab that would allow creating debug nodes, similar to how you can enable collision shape visibility when running from the editor. The Editor Only option of this enum for all nodes would also replace the Editor Only checkbox for lights.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Yes.
Is there a reason why this should be core and not an add-on in the asset library?
A built in option to mark a node as an editor or debug node would be a convenient feature.