Add a support for manually setting the activation of a scene as a default option #206
Replies: 7 comments 3 replies
-
To Add to this I looked into the situation IrishMerlin was in, and we looked at options in his Priority help thread. https://discord.com/channels/424284635074134018/1059879901919977523 When he mentions "Activate the Scene" he means the AsyncOperation.AllowSceneActivation bool when loading scenes. This suggestion is adding control of whether the scene manager should automatically activate a scene, or if there could be a load option that allows us to turn automatically activate off. Then have our own logic on scene load end to run, before activating it. Perfect example would be IrishMerlins example a fader that you want to fade in and out before the scene activates. |
Beta Was this translation helpful? Give feedback.
-
The Solution of Activating the Paused scene by the user would be the tricky part. Almost like if a load option where to exist to turn off automatically Activating Scenes. Then when the scene is at 90% trigger an event for the scenes waiting activation. maybe something like this. public void Awake()
{
SceneManager.OnAwaitingActivation += HandleAwaitingActivationScene;
SceneManager.OnLoadEnd += HandleOnLoadEnd;
}
public void HandleAwaitingActivationScene(AsyncOperation scene)
{
StartCoroutine("ActivateScene")
}
public Ienumerable ActivateScene(AsyncOperation scene)
{
// yield return StartCoroutine(Fader.ToBlack());
// unload sceneloader scene;
// scene.AllowSceneActivation = true;
}
public void HandleOnLoadEnd()
{
fader.ToClear();
} |
Beta Was this translation helpful? Give feedback.
-
You can do this with a custom SceneProcessor. Copy, make your own, and just override the 'IsPercentComplete()' until you're happy. |
Beta Was this translation helpful? Give feedback.
-
@IrishMerlin Pull Request is up with my changes if you wanted to test out my implementation, if you run into any problems. Comment on that pull request. |
Beta Was this translation helpful? Give feedback.
-
I closed the PR request, won't be taking it sorry. This can already be done with the included scene processors. I described briefly how to on your PR #207 |
Beta Was this translation helpful? Give feedback.
-
I replied to the other one, so ignore it. Here's my response. This is exactly what the processor does. See DefaultSceneProcessor, it's the one that FishNet defaults to but you can make your own. https://fish-networking.gitbook.io/docs/manual/components/managers/scenemanager |
Beta Was this translation helpful? Give feedback.
-
I apologize.. im gonna retreat with my tail between my legs and not look over simple facts like that the best I can.. Wasting peeps time. but yeah That would totally work lol |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I wanted to be able to load the next scene but do not activate it. Once the scene is loaded, I then fade the screen to black. Activate the scene and then un-fade the screen to normal.
I'm unable to do so with current version of FishNet SceneManager. The allowSceneActivation is automatically handled by the DefaultSceneProcessor.
It would be nice to manually set the scene activation with my script after the OnLoadEnd event is called.
Beta Was this translation helpful? Give feedback.
All reactions