Exceptions for scene transition manager

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Fitbie
Posts: 44
Joined: Tue Dec 07, 2021 6:30 pm

Exceptions for scene transition manager

Post by Fitbie »

Hi, I am using the standart scene transition manager. And I have a question: there are a couple of scenes where I would like to use a different loading screen. Literally 4-5. I don't want to make a separate canvas for them, but in scene transition manager there is no possibility to specify "exceptions". What to do? Create a separate canvas? Or may I keep scene transition manager on each scene? Thanks!
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Exceptions for scene transition manager

Post by Tony Li »

Hi,

The Standard Scene Transition Manager should be on the same GameObject as the Save System component. You shouldn't have a separate Standard Scene Transition Manager for each scene. Here are two options:

1. Before changing scenes, set the Standard Scene Transition Manager's loadingSceneName value. Example:

Code: Select all

(SaveSystem.sceneTransitionManager as StandardSceneTransitionManager).loadingSceneName = "Some Scene";
2. Or write a subclass of StandardSceneTransitionManager that overrides the LeaveScene() method. Add your subclass to the Save System GameObject in place of the original StandardSceneTransitionManager. Example:

Code: Select all

public class CustomSceneTransitionManager : StandardSceneTransitionManager
{
    public override IEnumerator LeaveScene()
    {
        loadSceneName = "Some Scene";
        yield return base.LeaveScene();
    }
}
Post Reply