Skip to content

KevinReilhac/SceneFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SceneFlow

Easy way to implement a loading screen.

scene changer

Authors

Installation

Install SceneFlow with Unity Package Manager

pkgmngr

  https://github.com/KevinReilhac/SceneFlow.git#upm

Initalization

  • Setup your SceneFlowSettings in project settings.

image

  • For fast setup, you can install and modify a LoadingScreen from the package samples.

image

  • 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

image

Load a scene

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 settings

showLoadingScreen parameter is optional, default is true.

Components

LoadSceneAfterTime

Load a scene after a delay.

image


LoadSceneOnEvent

Load a scene when an external UnityEvent call LoadScene method.

image


LoadNextSceneOnEvent

Load a scene when an external UnityEvent call LoadScene method.

image

Documentation

Read Documentation

About

Easy and fast way to implement a loading screen.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published