|Topic was automatically imported from the old Question2Answer platform.
I have a (possibly large) number of levels, in each level the designer can set a title, subtitle and other script parameters that define the gameplay of that specific level.
I prefer to have it there as script variables so that a designer can change it directly without having to modify the script itself.
I want to create a ‘Level select’ page where i use some of those script parameters in the list entry of each level.
HOW can i access those script parameters without actually loading the level completely?
I understand that i can just preload and instantiate every single scene, at which point i could call a function in the scene’s script that would transfer the necessary data to a global variable, but i guess that would waste a lot of memory / computation to loop through all the levels?
Especially when i might have hundreds?
Is there a way to access a scene file’s export parameter without ‘loading’ it completely into memory / what’s the most efficient way to do this for hundreds of files?
I will go with the load packedScene option for now, but i am not sure if this would work for hundreds of scenes.
So if someone could point out exactly if this would be good for hundreds of items?!
In the future i will probably just keep using the packedScene option but execute it only after the first installation or some update of level files and store the parsed data in an extra file, so that the parsing itself won’t happen on every startup…
Larzans | 2018-09-09 09:20