浏览代码

Refactoring some if-then logic.

/4.0
Todd Stinson 5 年前
当前提交
18e7d0c2
共有 1 个文件被更改,包括 2 次插入6 次删除
  1. 8
      Assets/Scenes/Meshing/Scripts/ToggleMeshClassification.cs

8
Assets/Scenes/Meshing/Scripts/ToggleMeshClassification.cs


{
#if UNITY_IOS && !UNITY_EDITOR
Debug.Assert(m_MeshManager != null, "mesh manager cannot be null");
if (m_MeshManager != null)
if ((m_MeshManager != null) && (m_MeshManager.subsystem is XRMeshSubsystem meshSubsystem))
XRMeshSubsystem meshSubsystem = m_MeshManager.subsystem as XRMeshSubsystem;
if (meshSubsystem != null)
{
meshSubsystem.SetClassificationEnabled(m_ClassificationEnabled);
}
meshSubsystem.SetClassificationEnabled(m_ClassificationEnabled);
}
#endif // UNITY_IOS && !UNITY_EDITOR
}
正在加载...
取消
保存