- Edited
Hi,
I'm trying to build a module in my utility framework for Godot that adds a scene in parts so when you "switch scenes" with my function the function will load the scene in a thread
then disassemble the scene and then reassemble it in parts (the order is decided by groups)
example on how end result code should look like (from user perspective):
everything in camera should load first then everything in terrain and then everything else
var groups = ["camera", "terrain"]
libSubManager.load_scene_with_interactive("res://scene.tscn",groups ,"task_tag")
here's the code that i currently have (it works sometimes and sometimes it doesn't
also I can't figure out how to get all parents above node so if a node is a child but has a group the code will try to load it even if its parent is not loaded yet , there's also a bunch more bugs I haven't thought of or mentioned if you can help resolve even one of them I'd be really helpful & thanks in advanced for any help,
also I'm aware of ImmersiveRPG's plugin that does this but I can't figure out anything from his code / I have a management system for all threads used in game and for me to integrate his plugin into my framework will take ungodly amounts of energy & time
code:
resource is the scene instance and groups is an array with all the groups entered ("camera" , "terrain")