mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
AdditiveLevelsNetworkManager - comments
This commit is contained in:
parent
5bbad6fd2f
commit
7dd3ce0163
@ -72,7 +72,7 @@ IEnumerator LoadAdditive(string sceneName)
|
|||||||
isInTransition = true;
|
isInTransition = true;
|
||||||
|
|
||||||
// This will return immediately if already faded in
|
// This will return immediately if already faded in
|
||||||
// e.g. by UnloadAdditive above or by default startup state
|
// e.g. by UnloadAdditive or by default startup state
|
||||||
yield return fadeInOut.FadeIn();
|
yield return fadeInOut.FadeIn();
|
||||||
|
|
||||||
// host client is on server...don't load the additive scene again
|
// host client is on server...don't load the additive scene again
|
||||||
@ -91,6 +91,7 @@ IEnumerator LoadAdditive(string sceneName)
|
|||||||
|
|
||||||
OnClientSceneChanged();
|
OnClientSceneChanged();
|
||||||
|
|
||||||
|
// Reveal the new scene content.
|
||||||
yield return fadeInOut.FadeOut();
|
yield return fadeInOut.FadeOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,9 +100,10 @@ IEnumerator UnloadAdditive(string sceneName)
|
|||||||
isInTransition = true;
|
isInTransition = true;
|
||||||
|
|
||||||
// This will return immediately if already faded in
|
// This will return immediately if already faded in
|
||||||
// e.g. by LoadAdditive above or by default startup state
|
// e.g. by LoadAdditive above or by default startup state.
|
||||||
yield return fadeInOut.FadeIn();
|
yield return fadeInOut.FadeIn();
|
||||||
|
|
||||||
|
// host client is on server...don't unload the additive scene here.
|
||||||
if (mode == NetworkManagerMode.ClientOnly)
|
if (mode == NetworkManagerMode.ClientOnly)
|
||||||
{
|
{
|
||||||
yield return SceneManager.UnloadSceneAsync(sceneName);
|
yield return SceneManager.UnloadSceneAsync(sceneName);
|
||||||
@ -115,8 +117,8 @@ IEnumerator UnloadAdditive(string sceneName)
|
|||||||
OnClientSceneChanged();
|
OnClientSceneChanged();
|
||||||
|
|
||||||
// There is no call to FadeOut here on purpose.
|
// There is no call to FadeOut here on purpose.
|
||||||
// Expectation is that a LoadAdditive will follow
|
// Expectation is that a LoadAdditive or full scene change
|
||||||
// that will call FadeOut after that scene loads.
|
// will follow that will call FadeOut after that scene loads.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user