internal static void Register() { // Clone descriptor var cinfo = new XRCameraSubsystemCinfo { id = typeof(UnityXRMockCameraSubsystem).FullName, providerType = typeof(MockProvider), subsystemTypeOverride = typeof(UnityXRMockCameraSubsystem), supportsAverageBrightness = true, supportsAverageColorTemperature = true, supportsAverageIntensityInLumens = true, supportsCameraConfigurations = false, supportsCameraImage = true, supportsColorCorrection = true, supportsDisplayMatrix = true, supportsFocusModes = false, supportsProjectionMatrix = true, supportsTimestamp = true, supportsCameraGrain = true, supportsFaceTrackingAmbientIntensityLightEstimation = true, supportsFaceTrackingHDRLightEstimation = true, supportsWorldTrackingAmbientIntensityLightEstimation = true, supportsWorldTrackingHDRLightEstimation = true }; Register(cinfo); }
static void Register() { const string id = "ARKit-Camera-Remote"; #if UNITY_EDITOR XRCameraSubsystemCinfo cameraSubsystemCinfo = new XRCameraSubsystemCinfo { id = id, implementationType = typeof(ARKitCameraRemoteSubsystem), supportsAverageBrightness = false, supportsAverageColorTemperature = true, supportsColorCorrection = false, supportsDisplayMatrix = true, supportsProjectionMatrix = true, supportsTimestamp = true, supportsCameraConfigurations = true, supportsCameraImage = true, supportsAverageIntensityInLumens = true }; if (!XRCameraSubsystem.Register(cameraSubsystemCinfo)) { Debug.LogErrorFormat("Cannot register the {0} subsystem", id); } else { Debug.LogFormat("Registered the {0} subsystem", id); } #endif // UNITY_EDITOR }
static void Register() { #if UNITY_IOS && !UNITY_EDITOR XRCameraSubsystemCinfo cameraSubsystemCinfo = new XRCameraSubsystemCinfo { id = k_SubsystemId, implementationType = typeof(ARKitCameraSubsystem), supportsAverageBrightness = false, supportsAverageColorTemperature = true, supportsColorCorrection = false, supportsDisplayMatrix = true, supportsProjectionMatrix = true, supportsTimestamp = true, supportsCameraConfigurations = true, supportsCameraImage = true, supportsAverageIntensityInLumens = true, supportsFocusModes = true, }; if (!XRCameraSubsystem.Register(cameraSubsystemCinfo)) { Debug.LogErrorFormat("Cannot register the {0} subsystem", k_SubsystemId); } #endif // UNITY_IOS && !UNITY_EDITOR }
static void Register() { if (!Api.AtLeast11_0()) { return; } XRCameraSubsystemCinfo cameraSubsystemCinfo = new XRCameraSubsystemCinfo { id = k_SubsystemId, implementationType = typeof(ARKitCameraSubsystem), supportsAverageBrightness = false, supportsAverageColorTemperature = true, supportsColorCorrection = false, supportsDisplayMatrix = true, supportsProjectionMatrix = true, supportsTimestamp = true, supportsCameraConfigurations = true, supportsCameraImage = true, supportsAverageIntensityInLumens = true, supportsFocusModes = true, supportsFaceTrackingAmbientIntensityLightEstimation = true, supportsFaceTrackingHDRLightEstimation = true, supportsWorldTrackingAmbientIntensityLightEstimation = true, supportsWorldTrackingHDRLightEstimation = false, }; if (!XRCameraSubsystem.Register(cameraSubsystemCinfo)) { Debug.LogErrorFormat("Cannot register the {0} subsystem", k_SubsystemId); } }
static void Register() { if (!Api.platformAndroid || !Api.loaderPresent) { return; } var cameraSubsystemCinfo = new XRCameraSubsystemCinfo { id = k_SubsystemId, providerType = typeof(ARCoreCameraSubsystem.ARCoreProvider), subsystemTypeOverride = typeof(ARCoreCameraSubsystem), supportsAverageBrightness = true, supportsAverageColorTemperature = false, supportsColorCorrection = true, supportsDisplayMatrix = true, supportsProjectionMatrix = true, supportsTimestamp = true, supportsCameraConfigurations = true, supportsCameraImage = true, supportsAverageIntensityInLumens = false, supportsFocusModes = true, supportsFaceTrackingAmbientIntensityLightEstimation = true, supportsFaceTrackingHDRLightEstimation = false, supportsWorldTrackingAmbientIntensityLightEstimation = true, supportsWorldTrackingHDRLightEstimation = true, supportsCameraGrain = false, }; if (!XRCameraSubsystem.Register(cameraSubsystemCinfo)) { Debug.LogError($"Failed to register the {k_SubsystemId} subsystem."); } }
static void Register() { XRCameraSubsystemCinfo cameraSubsystemCinfo = new XRCameraSubsystemCinfo(); cameraSubsystemCinfo.id = k_SubsystemId; cameraSubsystemCinfo.implementationType = typeof(ARKitCameraSubsystem); cameraSubsystemCinfo.supportsAverageBrightness = true; cameraSubsystemCinfo.supportsAverageColorTemperature = true; cameraSubsystemCinfo.supportsDisplayMatrix = true; cameraSubsystemCinfo.supportsProjectionMatrix = true; cameraSubsystemCinfo.supportsTimestamp = true; if (!XRCameraSubsystem.Register(cameraSubsystemCinfo)) { Debug.LogErrorFormat("Cannot register the {0} subsystem", k_SubsystemId); } }
private static void RegisterDescriptor(XRCameraSubsystemDescriptor overrideDescriptor = default) { if (overrideDescriptor != null) { // Clone descriptor var cinfo = new XRCameraSubsystemCinfo { id = overrideDescriptor.id, implementationType = overrideDescriptor.subsystemImplementationType, supportsAverageBrightness = overrideDescriptor.supportsAverageBrightness, supportsAverageColorTemperature = overrideDescriptor.supportsAverageColorTemperature, supportsCameraConfigurations = overrideDescriptor.supportsCameraConfigurations, supportsCameraImage = overrideDescriptor.supportsCameraImage, //supportsColorCorrection = overrideDescriptor.supportsColorCorrection, supportsDisplayMatrix = overrideDescriptor.supportsDisplayMatrix, supportsProjectionMatrix = overrideDescriptor.supportsProjectionMatrix, //supportsTimestamp = overrideDescriptor.supportsTimestampsupportsTimestamp, }; originalDescriptor = typeof(XRCameraSubsystemDescriptor).GetConstructors(BindingFlags.NonPublic | BindingFlags.Instance)[0] .Invoke(new object[] { cinfo }) as XRCameraSubsystemDescriptor; // Override subsystem overrideDescriptor.subsystemImplementationType = typeof(UnityXRMockCameraSubsystem); } else { // Clone descriptor var cinfo = new XRCameraSubsystemCinfo { id = ID, implementationType = typeof(UnityXRMockCameraSubsystem), supportsAverageBrightness = true, supportsAverageColorTemperature = true, supportsCameraConfigurations = false, supportsCameraImage = true, supportsColorCorrection = false, supportsDisplayMatrix = true, supportsProjectionMatrix = true, supportsTimestamp = true, }; Register(cinfo); } }
static void Register() { XRCameraSubsystemCinfo cameraSubsystemCinfo = new XRCameraSubsystemCinfo { id = k_SubsystemId, implementationType = typeof(ARCoreCameraSubsystem), supportsAverageBrightness = true, supportsAverageColorTemperature = false, supportsColorCorrection = true, supportsDisplayMatrix = true, supportsProjectionMatrix = true, supportsTimestamp = true }; if (!XRCameraSubsystem.Register(cameraSubsystemCinfo)) { Debug.LogErrorFormat("Cannot register the {0} subsystem", k_SubsystemId); } }
internal static void Register() { // Clone descriptor var cinfo = new XRCameraSubsystemCinfo { id = ID, implementationType = typeof(UnityXRMockCameraSubsystem), supportsAverageBrightness = true, supportsAverageColorTemperature = true, supportsAverageIntensityInLumens = true, supportsCameraConfigurations = false, supportsCameraImage = true, supportsColorCorrection = true, supportsDisplayMatrix = true, supportsFocusModes = false, supportsProjectionMatrix = true, supportsTimestamp = true, }; Register(cinfo); }
static void Register() { #if UNITY_EDITOR XRCameraSubsystemCinfo cameraSubsystemCinfo = new XRCameraSubsystemCinfo { id = ID, #if UNITY_2020_2_OR_NEWER providerType = typeof(MockCameraSubsystem.MockProvider), subsystemTypeOverride = typeof(MockCameraSubsystem), #else implementationType = typeof(MockCameraSubsystem), #endif supportsAverageBrightness = false, supportsAverageColorTemperature = true, supportsColorCorrection = false, supportsDisplayMatrix = true, supportsProjectionMatrix = true, supportsTimestamp = true, supportsCameraConfigurations = true, supportsCameraImage = true, supportsAverageIntensityInLumens = true, supportsFocusModes = true, supportsFaceTrackingAmbientIntensityLightEstimation = true, supportsFaceTrackingHDRLightEstimation = true, supportsWorldTrackingAmbientIntensityLightEstimation = true, supportsWorldTrackingHDRLightEstimation = false, }; if (!XRCameraSubsystem.Register(cameraSubsystemCinfo)) { Debug.LogErrorFormat("Cannot register the {0} subsystem", ID); } else { Debug.LogFormat("Registered the {0} subsystem", ID); } #endif // UNITY_EDITOR }