浏览代码

Add null guard when checking available features

/4.1
Tim Mowrer 4 年前
当前提交
f639fb37
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 5
      Assets/Scripts/UX/CheckAvailableFeatures.cs

5
Assets/Scripts/UX/CheckAvailableFeatures.cs


// Start is called before the first frame update
void Start()
{
var activeLoader = LoaderUtility.GetActiveLoader();
var planeDescriptors = new List<XRPlaneSubsystemDescriptor>();
SubsystemManager.GetSubsystemDescriptors<XRPlaneSubsystemDescriptor>(planeDescriptors);

m_PlaneOcclusion.interactable = true;
}
if(activeLoader.GetLoadedSubsystem<XRMeshSubsystem>() != null)
var activeLoader = LoaderUtility.GetActiveLoader();
if(activeLoader && activeLoader.GetLoadedSubsystem<XRMeshSubsystem>() != null)
{
m_Meshing.interactable = true;
}

正在加载...
取消
保存