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); } } } }
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; } } }
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); } } } }
static void InitDefaultValues() { Debug.Log("Check for WaveVR prefered editor settings"); SDK_TYPE = (XR_Enum.SDKType)EditorPrefs.GetInt("SDK_TYPE", 1); }