浏览代码

Remove uses of the null conditional operators on UnityEngine.Objects

/4.1
Tim Mowrer 4 年前
当前提交
03a0e7fb
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 5
      Assets/Scenes/FaceTracking/DisplayFaceInfo.cs
  2. 4
      Assets/Scripts/LightEstimation.cs

5
Assets/Scenes/FaceTracking/DisplayFaceInfo.cs


{
m_FaceManager = GetComponent<ARFaceManager>();
m_Session = GetComponent<ARSession>();
m_CameraManager = GetComponent<ARSessionOrigin>().camera?.GetComponent<ARCameraManager>();
var camera = GetComponent<ARSessionOrigin>().camera;
m_CameraManager = camera ? camera.GetComponent<ARCameraManager>() : null;
}
void OnEnable()

// Detect face tracking with world-facing camera support
var subsystem = m_Session?.subsystem;
var subsystem = m_Session ? m_Session.subsystem : null;
if (subsystem != null)
{
var configs = subsystem.GetConfigurationDescriptors(Allocator.Temp);

4
Assets/Scripts/LightEstimation.cs


arrow.rotation = Quaternion.LookRotation(mainLightDirection.Value);
}
}
else
else if (arrow)
arrow?.gameObject.SetActive(false);
arrow.gameObject.SetActive(false);
}
if (args.lightEstimation.mainLightColor.HasValue)

正在加载...
取消
保存