Closed lukaswagner closed 5 years ago
depends on #25
This is not the way to go, it seems. The static storage containing the Map/Situation to be loaded should still be implemented, but as documented in #25, the loading screen has to be implemented in the scene itself, if we want to cover the navmesh generation time. Maybe it's possible to do this using coroutines.
When selecting a map in the main menu, a loading screen scene should be loaded. Afterward, the actual scene should be loaded asynchronously. The loading screen should check the progress and update a progress bar. Once the scene is loaded, it may be activated automatically.
The map to load could be passed using a static class. In the main menu, a string should be set containing the map name, which will be checked in the Battlefield scene.
Async loading: http://www.alanzucconi.com/2016/03/30/loading-bar-in-unity/ Static storage: https://stackoverflow.com/questions/42393259/load-scene-with-param-variable-unity