#if AR_FOUNDATION using UnityEngine; using UnityEngine.XR.ARSubsystems; namespace Unity.XR.OpenXR.Features.PICOSupport { public class PICOCameraSubsystem: XRCameraSubsystem { internal const string k_SubsystemId = "PICOCameraSubsystem"; [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] static void RegisterDescriptor() { var cameraSubsystemCinfo = new XRCameraSubsystemCinfo { id = k_SubsystemId, providerType = typeof(PICOOpenXRProvider), subsystemTypeOverride = typeof(PICOCameraSubsystem), supportsAverageBrightness = false, supportsAverageColorTemperature = false, supportsColorCorrection = false, supportsDisplayMatrix = false, supportsProjectionMatrix = false, supportsTimestamp = false, supportsCameraConfigurations = false, supportsCameraImage = false, supportsAverageIntensityInLumens = false, supportsFocusModes = false, supportsFaceTrackingAmbientIntensityLightEstimation = false, supportsFaceTrackingHDRLightEstimation = false, supportsWorldTrackingAmbientIntensityLightEstimation = false, supportsWorldTrackingHDRLightEstimation = false, supportsCameraGrain = false, }; if (!XRCameraSubsystem.Register(cameraSubsystemCinfo)) { PLog.e($"Failed to register the {k_SubsystemId} subsystem."); } } class PICOOpenXRProvider : Provider { /// /// Construct the camera functionality provider for Meta. /// public PICOOpenXRProvider() { } /// /// Start the camera functionality. /// public override void Start() => PassthroughFeature.EnableSeeThroughManual(true); /// /// Stop the camera functionality. /// public override void Stop() => PassthroughFeature.EnableSeeThroughManual(false); /// /// Destroy any resources required for the camera functionality. /// public override void Destroy() => PassthroughFeature.Destroy(); } } } #endif