Esempio n. 1
0
        private static void RegisterDescriptor(XRSessionSubsystemDescriptor overrideDescriptor = default)
        {
            if (overrideDescriptor != null)
            {
                // Clone descriptor
                var cinfo = new XRSessionSubsystemDescriptor.Cinfo
                {
                    id = overrideDescriptor.id,
                    subsystemImplementationType = overrideDescriptor.subsystemImplementationType,
                    supportsInstall             = overrideDescriptor.supportsInstall
                };

                originalDescriptor = typeof(XRSessionSubsystemDescriptor).GetConstructors(BindingFlags.NonPublic | BindingFlags.Instance)[0]
                                     .Invoke(new object[] { cinfo }) as XRSessionSubsystemDescriptor;

                // Override subsystem
                overrideDescriptor.subsystemImplementationType = typeof(UnityXRMockSessionSubsystem);
            }
            else
            {
                XRSessionSubsystemDescriptor.RegisterDescriptor(new XRSessionSubsystemDescriptor.Cinfo
                {
                    id = ID,
                    subsystemImplementationType = typeof(UnityXRMockSessionSubsystem),
                    supportsInstall             = false
                });
            }
        }
 static void RegisterDescriptor()
 {
     XRSessionSubsystemDescriptor.RegisterDescriptor(new XRSessionSubsystemDescriptor.Cinfo
     {
         id = "ARCore-Session",
         subsystemImplementationType = typeof(ARCoreSessionSubsystem),
         supportsInstall             = false
     });
 }
 public void RegisterTestDescriptor()
 {
     XRSessionSubsystemDescriptor.RegisterDescriptor(new XRSessionSubsystemDescriptor.Cinfo
     {
         id                    = "Test-Session",
         providerType          = typeof(XRSessionSubsystemImpl.ProviderImpl),
         subsystemTypeOverride = typeof(XRSessionSubsystemImpl)
     });
 }
Esempio n. 4
0
 static void RegisterDescriptor()
 {
     XRSessionSubsystemDescriptor.RegisterDescriptor(new XRSessionSubsystemDescriptor.Cinfo
     {
         id = "Windows Mixed Reality Session",
         subsystemImplementationType = typeof(WindowsMRSessionSubsystem),
         supportsInstall             = false
     });
 }
 internal static void Register()
 {
     XRSessionSubsystemDescriptor.RegisterDescriptor(new XRSessionSubsystemDescriptor.Cinfo
     {
         id = ID,
         subsystemImplementationType = typeof(UnityXRMockSessionSubsystem),
         supportsInstall             = false
     });
 }
 internal static void Register()
 {
     XRSessionSubsystemDescriptor.RegisterDescriptor(new XRSessionSubsystemDescriptor.Cinfo
     {
         id                     = typeof(UnityXRMockSessionSubsystem).FullName,
         providerType           = typeof(MockProvider),
         subsystemTypeOverride  = typeof(UnityXRMockSessionSubsystem),
         supportsInstall        = false,
         supportsMatchFrameRate = false
     });
 }
Esempio n. 7
0
        static void RegisterDescriptor()
        {
#if PLATFORM_LUMIN
            XRSessionSubsystemDescriptor.RegisterDescriptor(new XRSessionSubsystemDescriptor.Cinfo
            {
                id = "MagicLeap-Session",
                subsystemImplementationType = typeof(MagicLeapSessionSubsystem),
                supportsInstall             = false
            });
#endif
        }
        static void RegisterDescriptor()
        {
#if UNITY_IOS && !UNITY_EDITOR
            XRSessionSubsystemDescriptor.RegisterDescriptor(new XRSessionSubsystemDescriptor.Cinfo
            {
                id = "ARKit-Session",
                subsystemImplementationType = typeof(ARKitSessionSubsystem),
                supportsInstall             = false
            });
#endif
        }
        static void RegisterDescriptor()
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            XRSessionSubsystemDescriptor.RegisterDescriptor(new XRSessionSubsystemDescriptor.Cinfo
            {
                id = "ARCore-Session",
                subsystemImplementationType = typeof(ARCoreSessionSubsystem),
                supportsInstall             = true,
                supportsMatchFrameRate      = true
            });
#endif
        }
        static void RegisterDescriptor()
        {
#if UNITY_EDITOR
            const string id = "ARKit-Remote-Session";
            XRSessionSubsystemDescriptor.RegisterDescriptor(new XRSessionSubsystemDescriptor.Cinfo
            {
                id = id,
                subsystemImplementationType = typeof(ARKitSessionRemoteSubsystem),
                supportsInstall             = false,
                supportsMatchFrameRate      = false
            });
            Debug.Log($"Register {id} subsystem");
#endif // UNITY_EDITOR
        }
Esempio n. 11
0
        static void RegisterDescriptor()
        {
            XRSessionSubsystemDescriptor.RegisterDescriptor(new XRSessionSubsystemDescriptor.Cinfo
            {
                id = "MARS-Session",
#if UNITY_2020_2_OR_NEWER
                providerType          = typeof(SessionSubsystem.MARSXRProvider),
                subsystemTypeOverride = typeof(SessionSubsystem),
#else
                subsystemImplementationType = typeof(SessionSubsystem),
#endif
                supportsInstall        = false,
                supportsMatchFrameRate = false,
            });
        }
 internal static void RegisterDescriptor(XRSessionSubsystemDescriptor overrideDescriptor = default)
 {
     if (overrideDescriptor != null)
     {
         overrideDescriptor.subsystemImplementationType = typeof(UnityXRMockSessionSubsystem);
     }
     else
     {
         XRSessionSubsystemDescriptor.RegisterDescriptor(new XRSessionSubsystemDescriptor.Cinfo
         {
             id = "UnityXRMock-Session",
             subsystemImplementationType = typeof(UnityXRMockSessionSubsystem),
             supportsInstall             = false
         });
     }
 }
        static void RegisterDescriptor()
        {
#if UNITY_EDITOR
            XRSessionSubsystemDescriptor.RegisterDescriptor(new XRSessionSubsystemDescriptor.Cinfo
            {
                id = ID,
#if UNITY_2020_2_OR_NEWER
                providerType          = typeof(MockSessionSubsystem.MockProvider),
                subsystemTypeOverride = typeof(MockSessionSubsystem),
#else
                subsystemImplementationType = typeof(MockSessionSubsystem),
#endif
                supportsInstall        = false,
                supportsMatchFrameRate = false
            });
            // Debug.Log($"Register {ID} subsystem");
#endif // UNITY_EDITOR
        }
Esempio n. 14
0
 public void RegisterTestDescriptor()
 {
     XRSessionSubsystemDescriptor.RegisterDescriptor(GetDescriptorCinfo(SupportsInstall.No));
     XRSessionSubsystemDescriptor.RegisterDescriptor(GetDescriptorCinfo(SupportsInstall.Yes));
 }