示例#1
0
        void SDK_GUI()
        {
            GUILayout.Label("SDK Settings", EditorStyles.boldLabel);
            SDK_TYPE = (XR_Enum.SDKType)EditorGUILayout.EnumPopup("Select SDK: ", SDK_TYPE, GUILayout.Width(250));

            if (GUI.changed)
            {
                assetsReference.SDK_Selected = SDK_TYPE;
                Debug.Log("<color=blue>" + assetsReference.SDK_Selected + "</color>");
                EditorPrefs.SetInt("SDK_TYPE", (int)SDK_TYPE);
                PlayerPrefs.SetInt("VirtualRealitySupported", (int)SDK_TYPE);

                string[] sdkTarget = new string[0];
                if (SDK_TYPE == XR_Enum.SDKType.XR)
                {
                    if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android)
                    {
                        sdkTarget = PlayerSettings.GetVirtualRealitySDKs(BuildTargetGroup.Android);
                    }
                    else if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.iOS)
                    {
                        sdkTarget = PlayerSettings.GetVirtualRealitySDKs(BuildTargetGroup.iOS);
                    }
                    else
                    {
                        sdkTarget = PlayerSettings.GetVirtualRealitySDKs(BuildTargetGroup.Standalone);
                    }
                }
            }
        }
示例#2
0
        private void OnEnable()
        {
            AssetsReference assetsReference = Resources.Load <AssetsReference>(ConstantVar.ResourcesPath.ASSETS_REFERENCE);

            if (assetsReference != null)
            {
                currentSDK = assetsReference.SDK_Selected;
                if (m_inputManager == null)
                {
                    m_inputManager = new InputManager();
                }

                switch (currentSDK)
                {
                case XR_Enum.SDKType.None: NonVR_SetUp(); break;

                case XR_Enum.SDKType.XR: XR_SetUp(); break;

                case XR_Enum.SDKType.WaveVR: WaveVR_Setup(); break;
                }
            }
        }
示例#3
0
        void InitNativePlugins(XR_Enum.SDKType type, BuildTarget target, bool enable)
        {
            //string resourceName = type.ToString() + "_Assets";
            BuildSettingAssetsHolder waveVRBuildFiles = Resources.Load <BuildSettingAssetsHolder>(ConstantVar.ResourcesPath.BUILD_SETTINGS);

            XR_SDK_Plugin[] allNativePluginFiles = null;
            if (waveVRBuildFiles != null)
            {
                allNativePluginFiles = waveVRBuildFiles.GetAllPluginFiles();
            }

            if (allNativePluginFiles != null)
            {
                foreach (XR_SDK_Plugin pluginFile in allNativePluginFiles)
                {
                    PluginImporter pluginImporter = AssetImporter.GetAtPath(pluginFile.GetFilePath) as PluginImporter;
                    if (pluginImporter != null && pluginFile.buildTarget == target && pluginImporter.GetCompatibleWithPlatform(pluginFile.buildTarget) == (!enable))
                    {
                        pluginImporter.SetCompatibleWithPlatform(pluginFile.buildTarget, enable);
                    }
                }
            }
        }
示例#4
0
 static void InitDefaultValues()
 {
     Debug.Log("Check for WaveVR prefered editor settings");
     SDK_TYPE = (XR_Enum.SDKType)EditorPrefs.GetInt("SDK_TYPE", 1);
 }