Skip to content

Commit

Permalink
Reset default environment. Passthrough only for Zapbox (#660)
Browse files Browse the repository at this point in the history
Accidentally set default environment to passthrough. set only for zapbox
  • Loading branch information
mikeskydev authored Mar 22, 2024
1 parent c58affc commit f9398d1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Assets/Scenes/Main.unity
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 12 additions & 1 deletion Assets/Scripts/EnvironmentCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Guid, Environment> m_GuidToEnvironment;

Expand All @@ -36,7 +39,15 @@ public IEnumerable<Environment> 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()
Expand Down

0 comments on commit f9398d1

Please sign in to comment.