/// <summary>
 /// Sets the active subsystem whose extension methods should be used.
 /// </summary>
 /// <param name="referencePointSubsystem">The <c>XRReferencePointSubsystem</c> being extended.</param>
 public static void ActivateExtensions(this XRReferencePointSubsystem referencePointSubsystem)
 {
     if (referencePointSubsystem == null)
     {
         SetDefaultDelegates();
     }
     else
     {
         var id = referencePointSubsystem.SubsystemDescriptor.id;
         s_AttachReferencePointDelegate = RegistrationHelper.GetValueOrDefault(s_AttachReferencePointDelegates, id, DefaultAttachReferencePoint);
         s_GetNativePtrDelegate         = RegistrationHelper.GetValueOrDefault(s_GetNativePtrDelegates, id, DefaultGetNativePtr);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Sets the active subsystem whose extension methods should be used.
 /// </summary>
 /// <param name="planeSubsystem">The <c>XRPlaneSubsystem</c> being extended.</param>
 public static void ActivateExtensions(this XRPlaneSubsystem planeSubsystem)
 {
     if (planeSubsystem == null)
     {
         SetDefaultDelegates();
     }
     else
     {
         var id = planeSubsystem.SubsystemDescriptor.id;
         s_GetNativePtrDelegate     = RegistrationHelper.GetValueOrDefault(s_GetNativePtrDelegates, id, DefaultGetNativePtr);
         s_GetTrackingStateDelegate = RegistrationHelper.GetValueOrDefault(s_GetTrackingStateDelegates, id, DefaultGetTrackingState);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// For internal use. Sets the active subsystem whose extension methods should be used.
 /// </summary>
 /// <param name="sessionSubsystem">The <c>XRSessionSubsystem</c> being extended.</param>
 public static void ActivateExtensions(this XRSessionSubsystem sessionSubsystem)
 {
     if (sessionSubsystem == null)
     {
         SetDefaultDelegates();
     }
     else
     {
         var id = sessionSubsystem.SubsystemDescriptor.id;
         s_InstallAsyncDelegate         = RegistrationHelper.GetValueOrDefault(s_InstallAsyncDelegates, id, DefaultInstallAsync);
         s_GetAvailabilityAsyncDelegate = RegistrationHelper.GetValueOrDefault(s_GetAvailabilityAsyncDelegates, id, DefaultGetAvailabilityAsync);
         s_GetNativePtrDelegate         = RegistrationHelper.GetValueOrDefault(s_GetNativePtrDelegates, id, DefaultGetNativePtr);
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// For internal use. Sets the active subsystem whose extension methods should be used.
        /// </summary>
        /// <param name="cameraSubsystem">The <c>XRCameraSubsystem</c> being extended.</param>
        public static void ActivateExtensions(this XRCameraSubsystem cameraSubsystem)
        {
            if (cameraSubsystem == null)

            {
                SetDefaultDelegates();
            }
            else
            {
                var id = cameraSubsystem.SubsystemDescriptor.id;
                s_IsPermissionGrantedDelegate   = RegistrationHelper.GetValueOrDefault(s_IsPermissionGrantedDelegates, id, DefaultIsPermissionGranted);
                s_TryGetColorCorrectionDelegate = RegistrationHelper.GetValueOrDefault(s_TryGetColorCorrectionDelegates, id, DefaultTryGetColorCorrection);
                s_GetNativePtrDelegate          = RegistrationHelper.GetValueOrDefault(s_GetNativePtrDelegates, id, DefaultGetNativePtr);
                s_AsyncCameraImageApi           = RegistrationHelper.GetValueOrDefault(s_CameraImageApis, id, s_DefaultAsyncCameraImageApi);
            }
        }