/// <summary> /// Creates a new subsystem descriptor and registers it with the <c>SubsystemManager</c>. /// </summary> /// <param name="cinfo">Constructor info describing the descriptor to create.</param> public static void Create(Cinfo cinfo) { #if UNITY_2020_2_OR_NEWER SubsystemDescriptorStore.RegisterDescriptor(new XRReferencePointSubsystemDescriptor(cinfo)); #else SubsystemRegistration.CreateDescriptor(new XRReferencePointSubsystemDescriptor(cinfo)); #endif }
/// <summary> /// Registers a new descriptor with the <c>SubsystemManager</c>. /// </summary> /// <param name="cinfo">The construction information for the new descriptor.</param> public static void Create(Cinfo cinfo) { #if UNITY_2020_2_OR_NEWER SubsystemDescriptorStore.RegisterDescriptor(new XRImageTrackingSubsystemDescriptor(cinfo)); #else SubsystemRegistration.CreateDescriptor(new XRImageTrackingSubsystemDescriptor(cinfo)); #endif }
/// <summary> /// Register a subsystem implementation. /// This should only be used by subsystem implementors. /// </summary> /// <param name="cinfo">Information used to construct the descriptor.</param> public static void RegisterDescriptor(Cinfo cinfo) { #if UNITY_2020_2_OR_NEWER SubsystemDescriptorStore.RegisterDescriptor(new XRSessionSubsystemDescriptor(cinfo)); #else SubsystemRegistration.CreateDescriptor(new XRSessionSubsystemDescriptor(cinfo)); #endif }
/// <summary> /// Registers a novel implementation of the <see cref="XRObjectTrackingSubsystem"/>. /// </summary> /// <param name="id">A unique string identifying the subsystem implementation.</param> /// <param name="capabilities">Describes the capabilities of the implementation.</param> /// <exception cref="System.ArgumentNullException">Thrown if <paramref name="id"/> is <c>null</c>.</exception> public static void Register <T>(string id, XRObjectTrackingSubsystemDescriptor.Capabilities capabilities) where T : XRObjectTrackingSubsystem { if (id == null) { throw new ArgumentNullException("id"); } SubsystemRegistration.CreateDescriptor(new XRObjectTrackingSubsystemDescriptor(id, typeof(T), capabilities)); }
public static PlayerIdentityLoginSubsystemDescriptor RegisterDescriptor( string id, Type implType, RuntimePlatform[] supportedPlatforms, RuntimePlatform defaultInPlatform, string displayName, string providerId) { var desc = new PlayerIdentityLoginSubsystemDescriptor( id, implType, supportedPlatforms, defaultInPlatform, displayName, providerId); return(SubsystemRegistration.CreateDescriptor(desc) ? desc : null); }
static void Register() { PXR_PassThroughDescriptor.Cinfo info = new PXR_PassThroughDescriptor.Cinfo(); info.id = "PicoXR Camera"; info.ImplementaionType = typeof(PXR_PassThroughSystem); PXR_PassThroughDescriptor descriptor = PXR_PassThroughDescriptor.Create(info); SubsystemRegistration.CreateDescriptor(descriptor); }
/// <summary> /// Creates a new subsystem descriptor and registers it with the <c>SubsystemManager</c>. /// </summary> /// <param name="cinfo">Construction info for the descriptor.</param> public static void Create(Cinfo cinfo) { var descriptor = new XRPlaneSubsystemDescriptor(cinfo); #if UNITY_2020_2_OR_NEWER SubsystemDescriptorStore.RegisterDescriptor(descriptor); #else SubsystemRegistration.CreateDescriptor(descriptor); #endif }
private static void RegisterDescriptor() { var res = SubsystemRegistration.CreateDescriptor(new WebXRSubsystemDescriptor() { id = typeof(WebXRSubsystem).FullName, subsystemImplementationType = typeof(WebXRSubsystem) }); if (res) Debug.Log("Registered " + nameof(WebXRSubsystemDescriptor)); else Debug.Log("Failed registering " + nameof(WebXRSubsystemDescriptor)); }
/// <summary> /// Register a provider implementation. /// This should only be used by subsystem implementors. /// </summary> /// <param name="subsystemId">The name of the specific subsystem implementation.</param> /// <param name="capabilities">The <see cref="Capabilities"/> of the specific subsystem implementation.</param> /// <typeparam name="T">The concrete type derived from <see cref="XRParticipantSubsystem"/> being registered.</typeparam> public static void Register <T>(string subsystemId, Capabilities capabilities) #if UNITY_2020_2_OR_NEWER where T : XRParticipantSubsystem.Provider #else where T : XRParticipantSubsystem #endif { #if UNITY_2020_2_OR_NEWER SubsystemDescriptorStore.RegisterDescriptor(new XRParticipantSubsystemDescriptor(subsystemId, typeof(T), null, capabilities)); #else SubsystemRegistration.CreateDescriptor(new XRParticipantSubsystemDescriptor(subsystemId, typeof(T), null, capabilities)); #endif }
public static AdaptivePerformanceSubsystemDescriptor RegisterDescriptor(Cinfo cinfo) { var desc = new AdaptivePerformanceSubsystemDescriptor(cinfo); if (SubsystemRegistration.CreateDescriptor(desc)) { return(desc); } else { return(null); } }
static XRTestSubsystem RegisterAndCreate() { SubsystemRegistration.CreateDescriptor(new XRTestSubsystemDescriptor { id = "Test Subsystem", subsystemImplementationType = typeof(XRTestSubsystem), }); var descriptors = new List <XRTestSubsystemDescriptor>(); SubsystemManager.GetSubsystemDescriptors <XRTestSubsystemDescriptor>(descriptors); return(descriptors[0].Create()); }
/// <summary> /// Only for internal use. /// </summary> /// <param name="cinfo"></param> /// <returns></returns> public static AdaptivePerformanceSubsystemDescriptor RegisterDescriptor(AdaptivePerformanceSubsystemDescriptor.Cinfo cinfo) { var desc = new AdaptivePerformanceSubsystemDescriptor(cinfo); if (SubsystemRegistration.CreateDescriptor(desc)) { return(desc); } else { var registeredDescriptors = GetRegisteredDescriptors(); foreach (var d in registeredDescriptors) { if (d.subsystemImplementationType == cinfo.subsystemImplementationType) { return(d); } } } return(null); }
public void RegisterSubsystemTest() { TestSubsystemDescriptor descriptor = new TestSubsystemDescriptor(); List <TestSubsystemDescriptor> descriptors = new List <TestSubsystemDescriptor>(); SubsystemManager.GetSubsystemDescriptors <TestSubsystemDescriptor>(descriptors); Assert.That(0 == descriptors.Count, "TestSubsystemDescriptor already registered."); // Populate the descriptor object descriptor.holdsThings = true; descriptor.id = "RuntimeTestSubsystem"; descriptor.subsystemImplementationType = typeof(ConcreteTestSubsystem); // Register the descriptor Assert.That(true == SubsystemRegistration.CreateDescriptor(descriptor), "Descriptor not added."); Assert.That(false == SubsystemRegistration.CreateDescriptor(descriptor), "Descriptor added twice."); SubsystemManager.GetSubsystemDescriptors <TestSubsystemDescriptor>(descriptors); Assert.That(1 == descriptors.Count, "TestSubsystemDescriptor not registered."); }
public static void Create(Providing.FaceSubsystemParams descriptorParams) { var descriptor = new XRFaceSubsystemDescriptor(descriptorParams); SubsystemRegistration.CreateDescriptor(descriptor); }
/// <summary> /// Registers a new descriptor. Should be called by provider implementations. /// </summary> /// <param name="cinfo"></param> public static void RegisterDescriptor(Cinfo cinfo) { SubsystemRegistration.CreateDescriptor(new XRRaycastSubsystemDescriptor(cinfo)); }
/// <summary> /// Creates a new subsystem descriptor and registers it with the <c>SubsystemManager</c>. /// </summary> /// <param name="cinfo">Construction info for the descriptor.</param> public static void Create(Cinfo cinfo) { var descriptor = new XRPlaneSubsystemDescriptor(cinfo); SubsystemRegistration.CreateDescriptor(descriptor); }
/// <summary> /// Register the descriptor for the human body subsystem implementation. /// </summary> /// <param name="humanBodySubsystemCinfo">The human body subsystem implementation construction information. /// </param> /// <returns> /// <c>true</c> if the descriptor was registered. Otherwise, <c>false</c>. /// </returns> public static bool Register(XRHumanBodySubsystemCinfo humanBodySubsystemCinfo) { XRHumanBodySubsystemDescriptor humanBodySubsystemDescriptor = XRHumanBodySubsystemDescriptor.Create(humanBodySubsystemCinfo); return(SubsystemRegistration.CreateDescriptor(humanBodySubsystemDescriptor)); }
/// <summary> /// Registers a camera subsystem implementation based on the given subsystem parameters. /// </summary> /// <param name="cameraSubsystemParams">The parameters defining the camera subsystem functionality implemented /// by the subsystem provider.</param> /// <returns> /// <c>true</c> if the subsystem implementation is registered. Otherwise, <c>false</c>. /// </returns> /// <exception cref="System.ArgumentException">Thrown when the values specified in the /// <see cref="XRCameraSubsystemCinfo"/> parameter are invalid. Typically, this will occur /// <list type="bullet"> /// <item> /// <description>if <see cref="XRCameraSubsystemCinfo.id"/> is <c>null</c> or empty</description> /// </item> /// <item> /// <description>if <see cref="XRCameraSubsystemCinfo.implementationType"/> is <c>null</c></description> /// </item> /// <item> /// <description>if <see cref="XRCameraSubsystemCinfo.implementationType"/> does not derive from the /// <see cref="XRCameraSubsystem"/> class /// </description> /// </item> /// </list> /// </exception> public static bool Register(XRCameraSubsystemCinfo cameraSubsystemParams) { XRCameraSubsystemDescriptor cameraSubsystemDescriptor = XRCameraSubsystemDescriptor.Create(cameraSubsystemParams); return(SubsystemRegistration.CreateDescriptor(cameraSubsystemDescriptor)); }
/// <summary> /// Creates a new subsystem descriptor and registers it with the <c>SubsystemManager</c>. /// </summary> /// <param name="cinfo">Constructor info describing the descriptor to create.</param> public static void Create(Cinfo cinfo) { SubsystemRegistration.CreateDescriptor(new XRReferencePointSubsystemDescriptor(cinfo)); }
/// <summary> /// Creates a new subsystem descriptor and registers it with the <c>SubsystemManager</c>. /// </summary> /// <param name="cinfo">Constructor info describing the descriptor to create.</param> public static void Create(Cinfo cinfo) { SubsystemRegistration.CreateDescriptor(new XRAnchorSubsystemDescriptor(cinfo)); }
/// <summary> /// Registers a subsystem implementation based on the given subystem parameters. /// </summary> /// <param name='environmentProbeSubsystemCinfo'>The parameters defining the environment probe functionality /// implemented by the subsystem provider.</param> /// <returns> /// <c>true</c> if the subsystem implementation is registered. Otherwise, <c>false</c>. /// </returns> /// <exception cref="ArgumentException">Thrown when the values specified in the /// <paramref name="environmentProbeSubsystemCinfo"/> parameter are invalid. Typically, this will occur /// <list type="bullet"> /// <item> /// <description>if <see cref="XREnvironmentProbeSubsystemCinfo.id"/> is <c>null</c> or empty</description> /// </item> /// <item> /// <description>if <see cref="XREnvironmentProbeSubsystemCinfo.implementationType"/> is <c>null</c> /// </description> /// </item> /// <item> /// <description>if <see cref="XREnvironmentProbeSubsystemCinfo.implementationType"/> does not derive from the /// <c>XREnvironmentProbeSubsystem</c> class /// </description> /// </item> /// </list> /// </exception> public static bool Register(XREnvironmentProbeSubsystemCinfo environmentProbeSubsystemCinfo) { XREnvironmentProbeSubsystemDescriptor environmentProbeSubsystemDescriptor = XREnvironmentProbeSubsystemDescriptor.Create(environmentProbeSubsystemCinfo); return(SubsystemRegistration.CreateDescriptor(environmentProbeSubsystemDescriptor)); }
/// <summary> /// Registers a new descriptor with the <c>SubsystemManager</c>. /// </summary> /// <param name="cinfo">The construction information for the new descriptor.</param> public static void Create(Cinfo cinfo) { SubsystemRegistration.CreateDescriptor(new XRImageTrackingSubsystemDescriptor(cinfo)); }
/// <summary> /// Registers a subsystem implementation with the <c>SubsystemManager</c>. /// </summary> /// <param name="descriptorParams"></param> public static void RegisterDescriptor(Cinfo descriptorParams) { var descriptor = new XRDepthSubsystemDescriptor(descriptorParams); SubsystemRegistration.CreateDescriptor(descriptor); }
public static PlayerIdentityBackendSubsystemDescriptor RegisterDescriptor(PlayerIdentityBackendSubsystemCInfo param) { var desc = new PlayerIdentityBackendSubsystemDescriptor(param); return(SubsystemRegistration.CreateDescriptor(desc) ? desc : null); }
public static void Create(Providing.StandaloneSubsystemParams parms) { SubsystemRegistration.CreateDescriptor(new StandaloneSubsystemDescriptor(parms.id, parms.subsystemImplementationType)); }
/// <summary> /// Register a subsystem implementation. /// This should only be used by subsystem implementors. /// </summary> /// <param name="subsystemId">The name of the specific subsystem implementation.</param> /// <param name="capabilities">The <see cref="Capabilities"/> of the specific subsystem implementation.</param> public static void Register <T>(string subsystemId, Capabilities capabilities) where T : XRParticipantSubsystem { SubsystemRegistration.CreateDescriptor(new XRParticipantSubsystemDescriptor(subsystemId, typeof(T), capabilities)); }