How to make a dynamic loading scene?

So I searched for this a lot, but most of the answers were not what I was looking for and the others were just going over my head.
So I have created a scene called “loading” and have animations and all the required stuff here. I want this scene to show every time I switch from one scene to another. I have 3 other scenes called “main”, " menu" and “store” and I want to add that loading scene between these. I can’t workout how can I do this. Also I wanna know how can I make the things load during the loading screen so that they don’t have to be loaded later on.
Thank you, let me know if I am not clear anywhere :slight_smile:

public void HandleSwitchLevel(){
StartCoroutine(Loading(“Level”));
}
private bool loadingItem = false;
IEnumerator Loading(string level){
this.loadingItem = true;
while(loadingItem){
Animate();
yield return null;
}
Application.LoadLevel(level);
}

Add the method as listener to your scene buttons, I guess the player can change scene via a button press.

If you need to perform other actions then add them also as listener. If you need to wait for those action to be done while loading then you need to create a connection between Loading and the other method. Using an event is most likely.

public UnityEvent OnLoaded;
public void MethodLoadingItemsForStore(){
       StartCoroutine(LoadingForStore());
}
IEnumerator LoadingForStore(){
     while(loadingStuff){yield return null;}
    OnLoaded.Invoke();
}

And your other class with Loading is registered to OnLoaded with that method:

public void HandleOnLoaded(){
    loadingItem = false;
}