-
-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an editor_only
property to Node (and remove it from specific uses such as Light3D)
#2512
Comments
This Editor Only property already exists for certain nodes such as Light3D, but there is no universal toggle that works for all nodes. I discussed this with reduz a while ago and he wasn't really in favor of moving this Editor Only property to Node (I don't remember why). |
editor_only
property to Node (and remove it from specific uses such as Light3D)
Seems like
It makes sense to me to have a dedicated property for this especially when we have Introducing
See also #115 (can be made to work as editor-only as well). |
Also, following godotengine/godot#46191, we may want to add an enum to control where the node is shown or instantiated. Therefore, instead of adding an
|
I don't think either option (hiding it or freeing it) is necessarily better than the other. Perhaps you could split this into "Hide at Runtime" and "Delete at Runtime"? |
Closing in favor of #3433, which is a more detailed proposal. |
Describe the project you are working on
Dungeon crawler
Describe the problem or limitation you are having in your project
I very often add objects as visual guides to scenes that are meant to be extended.
For instance in this screenshot I've added Left/Right/Top/Bottom labels to easily recognize the orientation of a room I'm working on:
Right now these nodes are hidden when the game starts but it's still overhead to create these objects, compile their shaders and load images that are only needed when editing.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
I suggest adding an "editor only" property to the node section of a node. When ticked this prevents the node and any of its children from being loaded in runtime.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
See above
If this enhancement will not be used often, can it be worked around with a few lines of script?
I'm currently working around it by making these nodes available in
_ready
but it's wastefulIs there a reason why this should be core and not an add-on in the asset library?
No this is a change that needs to happen in Godots scene loader.
The text was updated successfully, but these errors were encountered: