feature: load scene to tree, instead of changing to resource#7
Conversation
Add resource to tree instead of changing scene to resource directly. This allows to do changes on the scene before changing to it. Also added a few signals so that I'm able to add fade effects on top of it.
|
Thanks for the PR! I apologize for the delay in reviewing it. I've been avoiding making big changes to the |
|
Thanks for the updates. I think adding the I admittedly don't understand your setup. It sounds like there is a manager (likely an autoload) that is making the call to Overall, I think a lot of what is being done here could be put into an example level loader, maybe with just the addition of a The above script could be included in this repo as well, for people that only use this plugin. Another script could then extend its |
|
Yeah, I ended up not even needing the Oh, yeah, I guess you're right, that could be handled outside of the plugin. If you prefer to keep it simple and clean, that works for me too. |
|
That sounds good to me regarding the signals. I'm hesitant to add the methods, as I think much of that logic can be handled outside of the scene loader by a manager. If you'd like to open a second PR, either here or on https://github.com/Maaack/Godot-Game-Template (for more visibility as a contributor) with just the signals for existing methods, I'd be happy to merge that in pretty quick. I've added it to my todo list to get an example level manager into this repo. From there, maybe we can discuss what needs to be restructured to make it work for a general use case, or extend it to fit your use case. |
Add a new load method to add the loaded resource to the tree, instead of changing scene to resource directly.
This allows to do changes on the scene before changing to it.
In my case, it allows me to wait for other peers to be ready and spawn the characters before showing the new scene.
Also added a few new signals so that I'm able to add fade effects on top of it.