From f9398d1a27ea0aa4b9d5abc347100f7a4284ec56 Mon Sep 17 00:00:00 2001 From: Mike Nisbet Date: Fri, 22 Mar 2024 15:51:06 +0000 Subject: [PATCH] Reset default environment. Passthrough only for Zapbox (#660) Accidentally set default environment to passthrough. set only for zapbox --- Assets/Scenes/Main.unity | 4 +++- Assets/Scripts/EnvironmentCatalog.cs | 13 ++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 6bf5ea8bcf..5b0ce6989e 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -10184,7 +10184,9 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_SkyboxMaterial: {fileID: 2100000, guid: 502c8257ef70e3f4b9f6b176302930e6, type: 2} - m_DefaultEnvironment: {fileID: 11400000, guid: e7ee458a16eae2b48ac405f4ccc693e6, + m_DefaultEnvironment: {fileID: 11400000, guid: 5effa9d950f0f5943b60c7dd24471505, + type: 2} + m_PassthroughEnvironment: {fileID: 11400000, guid: e7ee458a16eae2b48ac405f4ccc693e6, type: 2} --- !u!114 &652605549 MonoBehaviour: diff --git a/Assets/Scripts/EnvironmentCatalog.cs b/Assets/Scripts/EnvironmentCatalog.cs index 30d18a4274..ffe69c8924 100644 --- a/Assets/Scripts/EnvironmentCatalog.cs +++ b/Assets/Scripts/EnvironmentCatalog.cs @@ -27,6 +27,9 @@ public class EnvironmentCatalog : MonoBehaviour public Material m_SkyboxMaterial; [SerializeField] private TiltBrush.Environment m_DefaultEnvironment; + + [SerializeField] private TiltBrush.Environment m_PassthroughEnvironment; + private bool m_IsLoading; private Dictionary m_GuidToEnvironment; @@ -36,7 +39,15 @@ public IEnumerable AllEnvironments } public Environment DefaultEnvironment { - get { return m_DefaultEnvironment; } + get + { +#if ZAPBOX_SUPPORTED + // Load into passthrough straight away. + return m_PassthroughEnvironment; +#endif + return m_DefaultEnvironment; + + } } void Awake()