Wait so I can add a schejule after Startup if I need some on update systems to run, and then just discard it after all of the needed systems are successfull at the task? Neat. On startup seems to be too fast for the assets to properly load (I was using assets as data for the default game state, before save data got applied)
You could do a schedule to manage this but that would require you to mess with Bevy's default runner to get it to run your custom schedule after startup but before the main loop, if you want to do a sort of waiting till all assets are loaded you could add a system to post startup stage that just waits for the assets to load, or you could look into the bevy asset loader crate, this lets you have a loading game state that it stays in and then transitions to a different state when it's done loading, this allows you to do things like have a loading screen and then transitions to the menu once all the assets are loaded
@@PhaestusFox as of now all other system sets just wait till all assets are loaded and applied. I don't even notice the loading time, it is just that startup stage for some reason does not even let me find loaded assets to apply them. It's literally a chain of load asset, if asset is loaded apply the data otherwise try loading again. Probably leaving as is is good enough for now - my game is not resource intensive anyways, it's a prototype of an Idle clicker game
That's interesting, are you calling load in the startup then waiting for them to load in the main loop? It could be that bevy inserts loaded assets into the resource each frame so it would not be possible to do anything with the data in startup since even if it loaded it is not added to the resources till the next frame. If this is the case I definitely recommend bevy asset loader crate since you don't need to make sure there are the correct systems in your customer schedule for asset loading, if you need to modify the assets after they are all loaded you can have three states loading, post load and loaded, have the game default to loading and tell the bevy asset loader plugin to transition to post load when it has loaded all the assets then you can transition to loaded after you finish your modifications to the assets. You might be able to apply a run condition like in_state(loaded) to the default base set so any system you add by default won't run till the assets are loaded
@@PhaestusFox I think I did something like that. Well, the loadings and applications are ordered. Tbf they need not be everywhere, it's just that both entities and ui layout is based on the data assets. I did switch to run condition when 0.10 came out.
doing god's work
Wait so I can add a schejule after Startup if I need some on update systems to run, and then just discard it after all of the needed systems are successfull at the task? Neat. On startup seems to be too fast for the assets to properly load (I was using assets as data for the default game state, before save data got applied)
You could do a schedule to manage this but that would require you to mess with Bevy's default runner to get it to run your custom schedule after startup but before the main loop, if you want to do a sort of waiting till all assets are loaded you could add a system to post startup stage that just waits for the assets to load, or you could look into the bevy asset loader crate, this lets you have a loading game state that it stays in and then transitions to a different state when it's done loading, this allows you to do things like have a loading screen and then transitions to the menu once all the assets are loaded
@@PhaestusFox as of now all other system sets just wait till all assets are loaded and applied. I don't even notice the loading time, it is just that startup stage for some reason does not even let me find loaded assets to apply them. It's literally a chain of load asset, if asset is loaded apply the data otherwise try loading again. Probably leaving as is is good enough for now - my game is not resource intensive anyways, it's a prototype of an Idle clicker game
That's interesting, are you calling load in the startup then waiting for them to load in the main loop? It could be that bevy inserts loaded assets into the resource each frame so it would not be possible to do anything with the data in startup since even if it loaded it is not added to the resources till the next frame. If this is the case I definitely recommend bevy asset loader crate since you don't need to make sure there are the correct systems in your customer schedule for asset loading, if you need to modify the assets after they are all loaded you can have three states loading, post load and loaded, have the game default to loading and tell the bevy asset loader plugin to transition to post load when it has loaded all the assets then you can transition to loaded after you finish your modifications to the assets. You might be able to apply a run condition like in_state(loaded) to the default base set so any system you add by default won't run till the assets are loaded
@@PhaestusFox I think I did something like that. Well, the loadings and applications are ordered. Tbf they need not be everywhere, it's just that both entities and ui layout is based on the data assets. I did switch to run condition when 0.10 came out.