GenerateAppKey() публичный статический Метод

public static GenerateAppKey ( ) : string
Результат string
Пример #1
0
        private static void LoadInstance()
        {
            if (_instance == null)
            {
                _instance = Resources.Load <SteamVR_Settings>("SteamVR_Settings");

                if (_instance == null)
                {
                    _instance = SteamVR_Settings.CreateInstance <SteamVR_Settings>();

#if UNITY_EDITOR
                    //string folderPath = SteamVR.GetResourcesFolderPath(true);
                    string folderPath = "Assets";
                    string assetPath  = System.IO.Path.Combine(folderPath, "SteamVR_Settings.asset");

                    UnityEditor.AssetDatabase.CreateAsset(_instance, assetPath);
                    UnityEditor.AssetDatabase.SaveAssets();
#endif
                }

                if (string.IsNullOrEmpty(_instance.editorAppKey))
                {
                    _instance.editorAppKey = SteamVR.GenerateAppKey();
                    Debug.Log("<b>[SteamVR Setup]</b> Generated you an editor app key of: " + _instance.editorAppKey + ". This lets the editor tell SteamVR what project this is. Has no effect on builds. This can be changed in Assets/SteamVR/Resources/SteamVR_Settings");
#if UNITY_EDITOR
                    UnityEditor.EditorUtility.SetDirty(_instance);
                    UnityEditor.AssetDatabase.SaveAssets();
#endif
                }
            }
        }
Пример #2
0
        private static void LoadInstance()
        {
            if (_instance == null)
            {
                _instance = Resources.Load <SteamVR_Settings>("SteamVR_Settings");

                if (_instance == null)
                {
                    _instance = SteamVR_Settings.CreateInstance <SteamVR_Settings>();

#if UNITY_EDITOR
                    string folderPath = SteamVR.GetResourcesFolderPath(true);
                    string assetPath  = System.IO.Path.Combine(folderPath, "SteamVR_Settings.asset");

                    UnityEditor.AssetDatabase.CreateAsset(_instance, assetPath);
                    UnityEditor.AssetDatabase.SaveAssets();
#endif
                }

                if (string.IsNullOrEmpty(_instance.appKey))
                {
                    _instance.appKey = SteamVR.GenerateAppKey();
                    Debug.Log("[SteamVR] Generated you an app key of: " + _instance.appKey + ". This can be changed in Assets/SteamVR/Resources/SteamVR_Settings");
#if UNITY_EDITOR
                    UnityEditor.EditorUtility.SetDirty(_instance);
                    UnityEditor.AssetDatabase.SaveAssets();
#endif
                }
            }
        }
Пример #3
0
        private static void SetDefaultsIfNeeded()
        {
            if (string.IsNullOrEmpty(_instance.editorAppKey))
            {
                _instance.editorAppKey = SteamVR.GenerateAppKey();
                Debug.Log("<b>[SteamVR Setup]</b> Generated you an editor app key of: " + _instance.editorAppKey + ". This lets the editor tell SteamVR what project this is. Has no effect on builds. This can be changed in Assets/SteamVR/Resources/SteamVR_Settings");
#if UNITY_EDITOR
                UnityEditor.EditorUtility.SetDirty(_instance);
                UnityEditor.AssetDatabase.SaveAssets();
#endif
            }

#if UNITY_EDITOR
            if (_instance.previewHandLeft == null)
            {
                _instance.previewHandLeft = FindDefaultPreviewHand(previewLeftDefaultAssetName);
            }

            if (_instance.previewHandRight == null)
            {
                _instance.previewHandRight = FindDefaultPreviewHand(previewRightDefaultAssetName);
            }
#endif

#if OPENVR_XR_API
            Unity.XR.OpenVR.OpenVRSettings settings = Unity.XR.OpenVR.OpenVRSettings.GetSettings();
            settings.ActionManifestFileRelativeFilePath = SteamVR_Input.GetActionsFilePath();

#if UNITY_EDITOR
            settings.EditorAppKey = _instance.editorAppKey;
#endif
#endif
        }
 private static void SetDefaultsIfNeeded()
 {
     if (string.IsNullOrEmpty(_instance.editorAppKey))
     {
         _instance.editorAppKey = SteamVR.GenerateAppKey();
         Debug.Log("<b>[SteamVR_Standalone Setup]</b> Generated you an editor app key of: " + _instance.editorAppKey + ". This lets the editor tell SteamVR_Standalone what project this is. Has no effect on builds. This can be changed in Assets/SteamVR_Standalone/Resources/SteamVR_Settings");
     }
 }
        private static void SetDefaultsIfNeeded()
        {
            if (string.IsNullOrEmpty(_instance.editorAppKey))
            {
                _instance.editorAppKey = SteamVR.GenerateAppKey();
                Debug.Log("<b>[SteamVR Setup]</b> Generated you an editor app key of: " + _instance.editorAppKey + ". This lets the editor tell SteamVR what project this is. Has no effect on builds. This can be changed in Assets/SteamVR/Resources/SteamVR_Settings");
#if UNITY_EDITOR
                EditorUtility.SetDirty(_instance);
                AssetDatabase.SaveAssets();
#endif
            }

#if UNITY_EDITOR
            if (_instance.previewHandLeft == null)
            {
                _instance.previewHandLeft = FindDefaultPreviewHand(previewLeftDefaultAssetName);
            }

            if (_instance.previewHandRight == null)
            {
                _instance.previewHandRight = FindDefaultPreviewHand(previewRightDefaultAssetName);
            }
#endif
        }