Easy way to implement a loading screen.
Install SceneFlow with Unity Package Manager
https://github.com/KevinReilhac/SceneFlow.git#upm- Setup your SceneFlowSettings in project settings.
- For fast setup, you can install and modify a LoadingScreen from the package samples.
- or you can also create a custom Loading screen prefab by creating a script that inherite from
ALoadingScreen.
public class CustomLoadingScreen : ALoadingScreen
{
[SerializeField] private Image progressBar;
public override void Hide() => gameObject.SetActive(false);
public override void Show() => gameObject.SetActive(true);
public override void UpdateProgress(float progress)
{
base.UpdateProgress(progress);
progressBar.fillAmount = progress;
}
}- Then set the prefab as used loading screen prefab by clicking on
Set as loading screen
SceneFlowManager.Load("MyScene"); //Load a scene by name
SceneFlowManager.Load(1, showLoadingScreen: false); //Load a scene by build index
SceneFlowManager.LoadNextScene(); //Load the next scene in the build settingsshowLoadingScreen parameter is optional, default is true.
Load a scene after a delay.
Load a scene when an external UnityEvent call LoadScene method.
Load a scene when an external UnityEvent call LoadScene method.







