|
|
|
|
|
|
using System; |
|
|
|
using System.Collections; |
|
|
|
using System.Collections.Generic; |
|
|
|
using UnityEngine; |
|
|
|
using UnityEngine.UI; |
|
|
|
|
|
|
get { return m_FaceTracking; } |
|
|
|
set { m_FaceTracking = value; } |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[SerializeField] |
|
|
|
Button m_FaceBlendShapes; |
|
|
|
public Button faceBlendShapes |
|
|
|
|
|
|
set { m_PlaneClassification = value; } |
|
|
|
} |
|
|
|
|
|
|
|
// Start is called before the first frame update
|
|
|
|
List<XRPlaneSubsystemDescriptor> planeDescriptors = new List<XRPlaneSubsystemDescriptor>(); |
|
|
|
var planeDescriptors = new List<XRPlaneSubsystemDescriptor>(); |
|
|
|
List<XRRaycastSubsystemDescriptor> rayCastDescriptors = new List<XRRaycastSubsystemDescriptor>(); |
|
|
|
var rayCastDescriptors = new List<XRRaycastSubsystemDescriptor>(); |
|
|
|
List<XRFaceSubsystemDescriptor> faceDescriptors = new List<XRFaceSubsystemDescriptor>(); |
|
|
|
var faceDescriptors = new List<XRFaceSubsystemDescriptor>(); |
|
|
|
List<XRImageTrackingSubsystemDescriptor> imageDescriptors = new List<XRImageTrackingSubsystemDescriptor>(); |
|
|
|
var imageDescriptors = new List<XRImageTrackingSubsystemDescriptor>(); |
|
|
|
List<XREnvironmentProbeSubsystemDescriptor> envDescriptors = new List<XREnvironmentProbeSubsystemDescriptor>(); |
|
|
|
var envDescriptors = new List<XREnvironmentProbeSubsystemDescriptor>(); |
|
|
|
List<XRAnchorSubsystemDescriptor> anchorDescriptors = new List<XRAnchorSubsystemDescriptor>(); |
|
|
|
var anchorDescriptors = new List<XRAnchorSubsystemDescriptor>(); |
|
|
|
List<XRObjectTrackingSubsystemDescriptor> objectDescriptors = new List<XRObjectTrackingSubsystemDescriptor>(); |
|
|
|
var objectDescriptors = new List<XRObjectTrackingSubsystemDescriptor>(); |
|
|
|
List<XRParticipantSubsystemDescriptor> participantDescriptors = new List<XRParticipantSubsystemDescriptor>(); |
|
|
|
var participantDescriptors = new List<XRParticipantSubsystemDescriptor>(); |
|
|
|
List<XRDepthSubsystemDescriptor> depthDescriptors = new List<XRDepthSubsystemDescriptor>(); |
|
|
|
var depthDescriptors = new List<XRDepthSubsystemDescriptor>(); |
|
|
|
List<XROcclusionSubsystemDescriptor> occlusionDescriptors = new List<XROcclusionSubsystemDescriptor>(); |
|
|
|
var occlusionDescriptors = new List<XROcclusionSubsystemDescriptor>(); |
|
|
|
List<XRCameraSubsystemDescriptor> cameraDescriptors = new List<XRCameraSubsystemDescriptor>(); |
|
|
|
var cameraDescriptors = new List<XRCameraSubsystemDescriptor>(); |
|
|
|
List<XRSessionSubsystemDescriptor> sessionDescriptors = new List<XRSessionSubsystemDescriptor>(); |
|
|
|
var sessionDescriptors = new List<XRSessionSubsystemDescriptor>(); |
|
|
|
SubsystemManager.GetSubsystemDescriptors<XRSessionSubsystemDescriptor>(sessionDescriptors); |
|
|
|
|
|
|
|
if(planeDescriptors.Count > 0 && rayCastDescriptors.Count > 0) |
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(faceDescriptors.Count > 0) |
|
|
|
{ |
|
|
|
m_FaceTracking.interactable = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach(XROcclusionSubsystemDescriptor occlusionDescriptor in occlusionDescriptors) |
|
|
|
foreach(var occlusionDescriptor in occlusionDescriptors) |
|
|
|
{ |
|
|
|
if(occlusionDescriptor.supportsHumanSegmentationDepthImage && occlusionDescriptor.supportsHumanSegmentationStencilImage) |
|
|
|
{ |
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if((cameraDescriptor.supportsAverageBrightness || cameraDescriptor.supportsAverageIntensityInLumens) && |
|
|
|
cameraDescriptor.supportsAverageColorTemperature && cameraDescriptor.supportsCameraConfigurations && |
|
|
|
if((cameraDescriptor.supportsAverageBrightness || cameraDescriptor.supportsAverageIntensityInLumens) && |
|
|
|
cameraDescriptor.supportsAverageColorTemperature && cameraDescriptor.supportsCameraConfigurations && |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(envDescriptors.Count > 0) |
|
|
|
{ |
|
|
|
m_EnvironmentProbes.interactable = true; |
|
|
|
|
|
|
{ |
|
|
|
m_PlaneDetection.interactable = true; |
|
|
|
foreach(var planeDescriptor in planeDescriptors) |
|
|
|
foreach(var planeDescriptor in planeDescriptors) |
|
|
|
{ |
|
|
|
if(planeDescriptor.supportsClassification) |
|
|
|
{ |
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(cameraDescriptors.Count > 0) |
|
|
|
{ |
|
|
|
foreach(var cameraDescriptor in cameraDescriptors) |
|
|
|
|
|
|
m_CameraImage.interactable = true; |
|
|
|
m_CpuImages.interactable = true; |
|
|
|
|
|
|
|
|
|
|
|
#if UNITY_IOS
|
|
|
|
if(sessionDescriptors.Count > 0 && ARKitSessionSubsystem.worldMapSupported) |
|
|
|
{ |
|
|
|
|
|
|
if(sessionDescriptors.Count > 0 && ARKitSessionSubsystem.coachingOverlaySupported) |
|
|
|
{ |
|
|
|
m_ARKitCoachingOverlay.interactable = true; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
#endif
|
|
|
|
|
|
|
|
if(depthDescriptors.Count > 0) |
|
|
|
|
|
|
if(planeDescriptors.Count > 0) |
|
|
|
{ |
|
|
|
m_PlaneOcclusion.interactable = true; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |