so following this method: https://felgo.com/doc/felgo-leveleditor/
I have successfully made my own level editor and implemented level loading logic into my game, works beautifully. now I am just wondering how do I load in specific levels? Right now I have it set like so:
I have a Container Object where all components are loaded into, and once it is completed I have this:
Component.onCompleted: {
levelEditor.loadSingleLevel(levelEditor.applicationJSONLevels[0])
}
two problems with this,
- The level being loaded might not be the correct level depending on the order the JSON files are loaded
- This could fail in the scenario where the applicationJSONLevels has not finished populating.
I tried to use this:
onLoadLevelFinished
So I can avoid problem 2, however it loads faster than the container, so it does not load correctly. I do not know if problem 2 is really a problem, as it could be possible that the JSON files will simply never load slower than the components, but I do not know how to measure the speed of the JSON being loaded / the components being loaded.