Scenes Loader
Presented by ScenesLoader class, this system assists you in work with game scenes.
To use this system, inject ScenesLoader class into your class, as shown below:
Parameters in inspector
mainMenuSceneName – main menu scene name. Scenes Loader will load this scene in case if you call ToMainMenu() method. Default value: "MainMenuScene".
loadingLabel – TextMeshProUGUI text label on loading screen, where loading progress will be displayed.
loadingBar – Image of loading bar, which indicates scene loading progress.
minLoadingTime – minimal loading time in seconds; time delay between scenes will not be lesser than this amount. Default value: 2 seconds.
Available methods
This method returns user to main menu scene. Scene loading process is asynchronous.
This method asynchronously loads scene with name.
Example:
This method asynchronously loads scene with name and invokes callback action afterwards.
Example:
Last updated