void OnGUI() { EditorGUILayout.Space(); GUILayout.TextArea("Click the button below to install the required XR Plugin Package via the package manager. " + "Please remember that new XR Plugins need to be activated through XR Management in Project Settings.", EditorStyles.wordWrappedLabel); EditorGUILayout.Space(); EditorGUI.BeginDisabledGroup(false); using (new EditorGUI.DisabledScope(XRPluginInstaller.CheckForPackage())) { if (GUILayout.Button("Install VR Simulator Package", EditorStyles.miniButton)) { XRPluginInstaller.InstallPackage(); } } EditorGUILayout.Space(); GUILayout.TextArea("Use this button to import optional sample scenes into your project.", EditorStyles.wordWrappedLabel); EditorGUILayout.Space(); if (GUILayout.Button("Import sample scenes", EditorStyles.miniButton)) { XRPluginInstaller.InstallSamples(); } }
void OnGUI() { EditorGUILayout.Space(); GUILayout.Label("Thank you for getting the VR Simulator from the Unity Asset Store.", EditorStyles.wordWrappedLabel); EditorGUILayout.Space(); GUILayout.Label("In order for the VR Simulator to work, it is required to install a custom XR Plugin. " + "Click the button below to install the required XR Plugin Package now. " + "Please remember that new XR Plugins need to be activated through XR Management in Project Settings. ", EditorStyles.wordWrappedLabel); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorStyles.miniButton.stretchWidth = false; if (GUILayout.Button("Install VR Simulator Package", EditorStyles.miniButton)) { window.Close(); XRPluginInstaller.InstallPackage(); } EditorGUILayout.Space(); GUILayout.Label("---", EditorStyles.boldLabel); GUILayout.Label("Note that this can also be done manually from the package manager UI or " + "from the VR Simulator installer window (VRSimulator -> Installer) later on. \n" + "Additional sample scenes can be imported from there as well.", EditorStyles.wordWrappedLabel); }