diff --git a/Assets/Mirror/Examples/AdditiveLevels/Scenes/Offline.unity b/Assets/Mirror/Examples/AdditiveLevels/Scenes/Offline.unity index 88681cf15..bcaed3e88 100644 --- a/Assets/Mirror/Examples/AdditiveLevels/Scenes/Offline.unity +++ b/Assets/Mirror/Examples/AdditiveLevels/Scenes/Offline.unity @@ -175,8 +175,8 @@ Camera: near clip plane: 0.3 far clip plane: 1000 field of view: 60 - orthographic: 0 - orthographic size: 5 + orthographic: 1 + orthographic size: 15 m_Depth: -1 m_CullingMask: serializedVersion: 2 diff --git a/Assets/Mirror/Examples/AdditiveLevels/Scenes/Online.unity b/Assets/Mirror/Examples/AdditiveLevels/Scenes/Online.unity index 3b49a8975..4ec402384 100644 --- a/Assets/Mirror/Examples/AdditiveLevels/Scenes/Online.unity +++ b/Assets/Mirror/Examples/AdditiveLevels/Scenes/Online.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.2312071, g: 0.2344121, b: 0.27077314, a: 1} + m_IndirectSpecularColor: {r: 0.043674428, g: 0.044857424, b: 0.059592403, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -212,6 +212,7 @@ Transform: m_LocalRotation: {x: 0.55403227, y: -0.21201213, z: 0.14845248, w: 0.79124016} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -268,8 +269,8 @@ Camera: near clip plane: 0.3 far clip plane: 1000 field of view: 60 - orthographic: 0 - orthographic size: 5 + orthographic: 1 + orthographic size: 15 m_Depth: -1 m_CullingMask: serializedVersion: 2 @@ -295,6 +296,7 @@ Transform: m_LocalRotation: {x: 0, y: -0.2658926, z: 0, w: 0.9640027} m_LocalPosition: {x: 3.84, y: 1.91, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -388,6 +390,7 @@ Transform: m_LocalRotation: {x: 0.9848078, y: -0, z: -0, w: -0.17364809} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 3 @@ -481,6 +484,7 @@ Transform: m_LocalRotation: {x: 0.28678825, y: -0.70940644, z: -0.4967319, w: -0.4095759} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 4 @@ -574,6 +578,7 @@ Transform: m_LocalRotation: {x: 0.9063079, y: 0, z: 0, w: 0.42261827} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 2 @@ -608,6 +613,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} m_Name: m_EditorClassIdentifier: + m_SendPointerHoverToParent: 1 m_HorizontalAxis: Horizontal m_VerticalAxis: Vertical m_SubmitButton: Submit @@ -640,6 +646,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 5 diff --git a/Assets/Mirror/Examples/AdditiveLevels/Scripts/PlayerCamera.cs b/Assets/Mirror/Examples/AdditiveLevels/Scripts/PlayerCamera.cs index e2fabaa6b..f0e396869 100644 --- a/Assets/Mirror/Examples/AdditiveLevels/Scripts/PlayerCamera.cs +++ b/Assets/Mirror/Examples/AdditiveLevels/Scripts/PlayerCamera.cs @@ -35,6 +35,7 @@ public override void OnStopLocalPlayer() mainCam.transform.SetParent(null); SceneManager.MoveGameObjectToScene(mainCam.gameObject, SceneManager.GetActiveScene()); mainCam.orthographic = true; + mainCam.orthographicSize = 15f; mainCam.transform.localPosition = new Vector3(0f, 70f, 0f); mainCam.transform.localEulerAngles = new Vector3(90f, 0f, 0f); } diff --git a/Assets/Mirror/Examples/AdditiveScenes/Scripts/AdditiveNetworkManager.cs b/Assets/Mirror/Examples/AdditiveScenes/Scripts/AdditiveNetworkManager.cs index 756a5dca9..2af18ccc5 100644 --- a/Assets/Mirror/Examples/AdditiveScenes/Scripts/AdditiveNetworkManager.cs +++ b/Assets/Mirror/Examples/AdditiveScenes/Scripts/AdditiveNetworkManager.cs @@ -37,7 +37,8 @@ public override void OnStopServer() public override void OnStopClient() { - StartCoroutine(UnloadScenes()); + if (mode == NetworkManagerMode.Offline) + StartCoroutine(UnloadScenes()); } IEnumerator LoadSubScenes() diff --git a/Assets/Mirror/Examples/MultipleAdditiveScenes/Scripts/MultiSceneNetManager.cs b/Assets/Mirror/Examples/MultipleAdditiveScenes/Scripts/MultiSceneNetManager.cs index 116b59b0a..f248a3b6e 100644 --- a/Assets/Mirror/Examples/MultipleAdditiveScenes/Scripts/MultiSceneNetManager.cs +++ b/Assets/Mirror/Examples/MultipleAdditiveScenes/Scripts/MultiSceneNetManager.cs @@ -118,7 +118,8 @@ public override void OnStopServer() IEnumerator ServerUnloadSubScenes() { for (int index = 0; index < subScenes.Count; index++) - yield return SceneManager.UnloadSceneAsync(subScenes[index]); + if (subScenes[index].IsValid()) + yield return SceneManager.UnloadSceneAsync(subScenes[index]); subScenes.Clear(); subscenesLoaded = false; @@ -131,8 +132,8 @@ IEnumerator ServerUnloadSubScenes() /// public override void OnStopClient() { - // make sure we're not in host mode - if (mode == NetworkManagerMode.ClientOnly) + // Make sure we're not in ServerOnly mode now after stopping host client + if (mode == NetworkManagerMode.Offline) StartCoroutine(ClientUnloadSubScenes()); } @@ -140,10 +141,8 @@ public override void OnStopClient() IEnumerator ClientUnloadSubScenes() { for (int index = 0; index < SceneManager.sceneCount; index++) - { if (SceneManager.GetSceneAt(index) != SceneManager.GetActiveScene()) yield return SceneManager.UnloadSceneAsync(SceneManager.GetSceneAt(index)); - } } #endregion