You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the project you are working on:
Top-down 2d game with several viewports that have to be updated in a specific order, then rendered.
Describe the problem or limitation you are having in your project:
I'd like to have a way to globally update or call functions in nodes that are scattered across the SceneTree.
I want to update the positions of those objects only after everything else has been updated.
Describe how this feature / enhancement will help you overcome this problem or limitation:
I'd like to be able to define Autoloads that will be created below the current scene instead of above it.
This way, I can keep track of the nodes I'd like to update adding them to a list and calling them in the Autoload that is certain to be ran after everything else.
Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
In the editor, the project manager could also display the Scene as a non-removable "Autoload", and allow the user to place Autoloads below it.
Additionally, the API used by plugins to add/remove Autoloads could be updated to check and specify their order and the position of the Scene inside the list.
Describe implementation detail for your proposal (in code), if possible:
<>
If this enhancement will not be used often, can it be worked around with a few lines of script?:
Maybe, but they would require more boilerplate and more strict setups.
Is there a reason why this should be core and not an add-on in the asset library?:
It is a feature better added as a core one as it can give more control to Autoloads and plugin creators.
The text was updated successfully, but these errors were encountered:
I'd like to have a way to globally update or call functions in nodes that are scattered across the SceneTree.
I want to update the positions of those objects only after everything else has been updated.
Just for arguments' sake, would a SceneTree.call_group() solve this alongside a signal emission/connection for the, "Everything is done. Now do this," callback?
I'd like to be able to define Autoloads that will be created below the current scene instead of above it.
This way, I can keep track of the nodes I'd like to update adding them to a list and calling them in the Autoload that is certain to be ran after everything else.
I'm really quite confused about what you are saying here, so some of the following may or may not be relevant:
Are these autoloads that would be moved whenever SceneTree.change_scene() is called? And are you expecting these nodes to always show up as children of the local root scene in the Scene dock? How would having non-global, child autoloaded nodes work with nested hierarchies of scenes? Does each generation of scene (parent/child/etc.) get its own unique copy of these non-singleton autoloads? If not, how do you configure which scenes they are always created in (might as well just add traits to GDScript and define a trait that lets your root node's script instantiate and use the "autoload" as a child - would be far cleaner).
You can already add scenes as autoloads, so the mockup doesn't really communicate to me what functional difference you are expecting.
Are you expecting the "Scene" in your example to be a node that is instantiated as a child of the "WorldManager" node? Is that what this is about?
Calinou
changed the title
Allow Autoloads to be instanced below the user-ran scene
Allow Autoloads to be instanced below the user-run scene
Sep 12, 2020
Describe the project you are working on:
Top-down 2d game with several viewports that have to be updated in a specific order, then rendered.
Describe the problem or limitation you are having in your project:
I'd like to have a way to globally update or call functions in nodes that are scattered across the SceneTree.
I want to update the positions of those objects only after everything else has been updated.
Describe how this feature / enhancement will help you overcome this problem or limitation:
I'd like to be able to define Autoloads that will be created below the current scene instead of above it.
This way, I can keep track of the nodes I'd like to update adding them to a list and calling them in the Autoload that is certain to be ran after everything else.
Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
In the editor, the project manager could also display the Scene as a non-removable "Autoload", and allow the user to place Autoloads below it.
Additionally, the API used by plugins to add/remove Autoloads could be updated to check and specify their order and the position of the Scene inside the list.
Describe implementation detail for your proposal (in code), if possible:
<>
If this enhancement will not be used often, can it be worked around with a few lines of script?:
Maybe, but they would require more boilerplate and more strict setups.
Is there a reason why this should be core and not an add-on in the asset library?:
It is a feature better added as a core one as it can give more control to Autoloads and plugin creators.
The text was updated successfully, but these errors were encountered: