示例#1
0
        internal static bool ShouldDisableLegacyVR()
        {
            if (!s_Descriptors.Any())
            {
                lock (s_DescriptorsLock)
                {
                    if (!s_Descriptors.Any())
                    {
                        SubsystemManager.GetAllSubsystemDescriptors(s_Descriptors);
                    }
                }
            }

            foreach (var descriptor in s_Descriptors)
            {
                if (descriptor.GetType() == typeof(XRDisplaySubsystemDescriptor))
                {
                    XRDisplaySubsystemDescriptor displayDescriptor = (XRDisplaySubsystemDescriptor)descriptor;

                    if (displayDescriptor.disablesLegacyVr)
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }
示例#2
0
    void Update()
    {
        try
        {
            SubsystemManager.GetAllSubsystemDescriptors(new List <ISubsystemDescriptor>());//<XRInputSubsystem>;

            xr.TryGetBoundaryPoints(boundryPoints);
            xr.boundaryChanged += delegate(XRInputSubsystem i)
            {
                i.TryGetBoundaryPoints(boundryPoints);
            };//Hopefully I'll get updated boundry points now
        }
        catch { }
    }
        internal static bool ShouldDisableLegacyVR()
        {
            List <ISubsystemDescriptor> descriptors = new List <ISubsystemDescriptor>();

            SubsystemManager.GetAllSubsystemDescriptors(descriptors);

            foreach (var descriptor in descriptors)
            {
                if (descriptor.GetType() == typeof(XRDisplaySubsystemDescriptor))
                {
                    XRDisplaySubsystemDescriptor displayDescriptor = (XRDisplaySubsystemDescriptor)descriptor;

                    if (displayDescriptor.disablesLegacyVr)
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }