예제 #1
0
        private static bool IsPluginVersion200OrNewer()
        {
            // 2.0 version adds namespaces to SteamVR
            Type controllerManagerClass = VRTK_SharedMethods.GetTypeUnknownAssembly("Valve.VR.SteamVR_Events");

            return(controllerManagerClass != null);
        }
예제 #2
0
        private static bool IsSteamVRInputCompiled()
        {
            // determines if the developer has built the SteamVR inputs. Otherwise, because of how Unity compiles things it will be unable to build the inputs because it can't build the whole project
            Type steamVRInputClass = VRTK_SharedMethods.GetTypeUnknownAssembly("Valve.VR.SteamVR_Input_ActionSet_naturalistic");

            return(steamVRInputClass != null);
        }
        private static bool IsPluginVersion201OrNewer()
        {
            Type steamInputClass = VRTK_SharedMethods.GetTypeUnknownAssembly("Valve.VR.SteamVR_Input");

            if (steamInputClass == null)
            {
                return(false);
            }

            return(steamInputClass.GetMethod("IdentifyActionsFile", BindingFlags.Public | BindingFlags.Static) != null);
        }
예제 #4
0
        private static bool IsPluginVersion122OrNewer()
        {
            Type controllerManagerClass = VRTK_SharedMethods.GetTypeUnknownAssembly("SteamVR_ControllerManager");

            if (controllerManagerClass == null)
            {
                return(false);
            }

            return(controllerManagerClass.GetMethod("SetUniqueObject", BindingFlags.NonPublic | BindingFlags.Instance) != null);
        }
예제 #5
0
        private static bool IsPluginVersion111OrOlder()
        {
            Type typeUnknownAssembly = VRTK_SharedMethods.GetTypeUnknownAssembly("SteamVR_Utils");

            if (typeUnknownAssembly == null)
            {
                return(false);
            }
            Type nestedType = typeUnknownAssembly.GetNestedType("Event");

            return(!(nestedType == null) && nestedType.GetMethod("Listen", BindingFlags.Static | BindingFlags.Public) != null);
        }
        private static bool IsBHapticsInstalled()
        {
            Type pluginClass = VRTK_SharedMethods.GetTypeUnknownAssembly("Bhaptics.Tact.Unity.BhapticsManager");

            if (pluginClass == null)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
        private static bool IsPluginVersion111OrOlder()
        {
            Type utilsClass = VRTK_SharedMethods.GetTypeUnknownAssembly("SteamVR_Utils");

            if (utilsClass == null)
            {
                return(false);
            }

            Type eventClass = utilsClass.GetNestedType("Event");

            return(eventClass != null && eventClass.GetMethod("Listen", BindingFlags.Public | BindingFlags.Static) != null);
        }
        private static bool IsSenseGloveInstalled()
        {
            Type pluginClass = VRTK_SharedMethods.GetTypeUnknownAssembly("SenseGloveCs.SenseGlove");

            if (pluginClass == null)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
예제 #9
0
        private static bool IsLeapMotionInstalled()
        {
            Type pluginClass = VRTK_SharedMethods.GetTypeUnknownAssembly("Leap.Unity.LeapProvider");

            if (pluginClass == null)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
예제 #10
0
        // Token: 0x060012BC RID: 4796 RVA: 0x00069578 File Offset: 0x00067778
        private static Version GetOculusWrapperVersion()
        {
            Type typeUnknownAssembly = VRTK_SharedMethods.GetTypeUnknownAssembly("OVRPlugin");

            if (typeUnknownAssembly == null)
            {
                return(null);
            }
            FieldInfo field = typeUnknownAssembly.GetField("wrapperVersion", BindingFlags.Static | BindingFlags.Public);

            if (field == null)
            {
                return(null);
            }
            return((Version)field.GetValue(null));
        }
예제 #11
0
        private static bool IsPluginVersion120()
        {
            Type typeUnknownAssembly = VRTK_SharedMethods.GetTypeUnknownAssembly("SteamVR_Events");

            if (typeUnknownAssembly == null)
            {
                return(false);
            }
            MethodInfo method = typeUnknownAssembly.GetMethod("System", BindingFlags.Static | BindingFlags.Public);

            if (method == null)
            {
                return(false);
            }
            ParameterInfo[] parameters = method.GetParameters();
            return(parameters.Length == 1 && parameters[0].ParameterType == typeof(string));
        }
        private static Version GetOculusRuntimeVersion()
        {
            Type pluginClass = VRTK_SharedMethods.GetTypeUnknownAssembly("OVRPlugin");

            if (pluginClass == null)
            {
                return(null);
            }

            PropertyInfo versionProperty = pluginClass.GetProperty("version", BindingFlags.Public | BindingFlags.Static);

            if (versionProperty == null)
            {
                return(null);
            }

            var version = (Version)versionProperty.GetGetMethod().Invoke(null, null);

            return(version);
        }
        private static Version GetOculusWrapperVersion()
        {
            Type pluginClass = VRTK_SharedMethods.GetTypeUnknownAssembly("OVRPlugin");

            if (pluginClass == null)
            {
                return(null);
            }

            FieldInfo versionField = pluginClass.GetField("wrapperVersion", BindingFlags.Public | BindingFlags.Static);

            if (versionField == null)
            {
                return(null);
            }

            var version = (Version)versionField.GetValue(null);

            return(version);
        }
예제 #14
0
        private static bool IsPluginVersion121OrNewer()
        {
            Type eventClass = typeof(SDK_SteamVRDefines).Assembly.GetType("SteamVR_Events");

            if (eventClass == null)
            {
                return(false);
            }

            MethodInfo systemMethod = eventClass.GetMethod("System", BindingFlags.Public | BindingFlags.Static);

            if (systemMethod == null)
            {
                return(false);
            }

            ParameterInfo[] systemMethodParameters = systemMethod.GetParameters();
            if (systemMethodParameters.Length != 1)
            {
                return(false);
            }

            return(systemMethodParameters[0].ParameterType == VRTK_SharedMethods.GetTypeUnknownAssembly("Valve.VR.EVREventType"));
        }
예제 #15
0
        private static bool IsManusVRInstalled()
        {
            Type pluginClass = VRTK_SharedMethods.GetTypeUnknownAssembly("Assets.ManusVR.Scripts.HandData");

            return(!(pluginClass == null));
        }
 private static bool IsAvatarAvailable()
 {
     return((IsUtilitiesVersion1120OrNewer() || IsUtilitiesVersion1110OrOlder()) &&
            VRTK_SharedMethods.GetTypeUnknownAssembly("OvrAvatar") != null);
 }
예제 #17
0
 private static bool IsDaydreamAvailable()
 {
     return(VRTK_SharedMethods.GetTypeUnknownAssembly("GvrController") != null);
 }
예제 #18
0
        private static bool HasControllerVisualization()
        {
            Type controllerVisualizerClass = VRTK_SharedMethods.GetTypeUnknownAssembly("VRTK.WindowsMixedReality.MotionControllerVisualizer");

            return(controllerVisualizerClass != null);
        }
예제 #19
0
 private static bool IsHyperealVRAvailable()
 {
     return(VRTK_SharedMethods.GetTypeUnknownAssembly("Hypereal.HyperealApi") != null);
 }
예제 #20
0
 private static bool IsXimmerseAvailable()
 {
     return(VRTK_SharedMethods.GetTypeUnknownAssembly("Ximmerse.InputSystem.XDevicePlugin") != null);
 }
예제 #21
0
        private static bool HasControllerVisualization()
        {
            Type controllerVisualizerClass = VRTK_SharedMethods.GetTypeUnknownAssembly("Pvr_UnitySDKAPI.Controller.UPvr_GetControllerState");

            return(controllerVisualizerClass != null);
        }
예제 #22
0
        private static bool IsPluginVersion122OrNewer()
        {
            Type typeUnknownAssembly = VRTK_SharedMethods.GetTypeUnknownAssembly("SteamVR_ControllerManager");

            return(!(typeUnknownAssembly == null) && typeUnknownAssembly.GetMethod("SetUniqueObject", BindingFlags.Instance | BindingFlags.NonPublic) != null);
        }