/// <inheritdoc/> public override void Draw(Rect window) { wasApplied = false; GUILayout.BeginArea(window); { GUILayout.Label("VR Hardware Setup", CreatorEditorStyles.Title); GUILayout.Label("Select the VR hardware you are working with:", CreatorEditorStyles.Header); selectedLoader = CreatorGUILayout.DrawToggleGroup(selectedLoader, options, nameplates); if (selectedLoader == XRLoader.Other) { GUILayout.Label("The Creator does not provide an automated setup for your device. You need to refer to your device's vendor documentation in order to enable a compatible loader in the Unity's XR Plugin Management.", CreatorEditorStyles.Paragraph); GUILayout.BeginHorizontal(); GUILayout.Label("Please tell us which VR Hardware you are using:", CreatorEditorStyles.Label); otherHardwareText = CreatorGUILayout.DrawTextField(otherHardwareText, -1, GUILayout.Width(window.width * 0.4f)); GUILayout.EndHorizontal(); } } GUILayout.EndArea(); }
/// <inheritdoc /> public override void Draw(Rect window) { GUILayout.BeginArea(window); GUILayout.Label("Setup Training", CreatorEditorStyles.Title); GUI.enabled = loadSampleScene == false; GUILayout.Label("Name of your VR Training", CreatorEditorStyles.Header); courseName = CreatorGUILayout.DrawTextField(courseName, MaxCourseNameLength, GUILayout.Width(window.width * 0.7f)); GUI.enabled = true; if (CourseAssetUtils.CanCreate(courseName, out string errorMessage) == false && lastCreatedCourse != courseName) { GUIContent courseWarningContent = warningContent; courseWarningContent.text = errorMessage; GUILayout.Label(courseWarningContent, CreatorEditorStyles.Label, GUILayout.MinHeight(MinHeightOfInfoText)); CanProceed = false; } else { GUILayout.Space(MinHeightOfInfoText + CreatorEditorStyles.BaseIndent); CanProceed = true; } GUILayout.BeginHorizontal(); GUILayout.Space(CreatorEditorStyles.Indent); GUILayout.BeginVertical(); bool isUseCurrentScene = GUILayout.Toggle(useCurrentScene, "Take my current scene", CreatorEditorStyles.RadioButton); if (useCurrentScene == false && isUseCurrentScene) { useCurrentScene = true; createNewScene = false; loadSampleScene = false; } bool isCreateNewScene = GUILayout.Toggle(createNewScene, "Create a new scene", CreatorEditorStyles.RadioButton); if (createNewScene == false && isCreateNewScene) { createNewScene = true; useCurrentScene = false; loadSampleScene = false; } EditorGUILayout.Space(); loadSampleScene = GUILayout.Toggle(loadSampleScene, "Load Step by Step Guide Scene", CreatorEditorStyles.RadioButton); if (loadSampleScene) { createNewScene = false; useCurrentScene = false; CanProceed = true; GUILayout.BeginHorizontal(); { GUILayout.Space(CreatorEditorStyles.Indent); CreatorGUILayout.DrawLink("Hello Creator – a 5-step guide to a basic training application", "https://developers.innoactive.de/documentation/creator/latest/articles/step-by-step-guides/hello-creator.html"); } GUILayout.EndHorizontal(); } GUILayout.EndVertical(); GUILayout.EndHorizontal(); if (createNewScene) { GUIContent helpContent; string sceneInfoText = "Scene will have the same name as the training course."; if (SceneSetupUtils.SceneExists(courseName)) { sceneInfoText += " Scene already exists"; CanProceed = false; helpContent = warningContent; } else { helpContent = infoContent; } helpContent.text = sceneInfoText; GUILayout.BeginHorizontal(); { GUILayout.Space(CreatorEditorStyles.Indent); EditorGUILayout.LabelField(helpContent, CreatorEditorStyles.Label, GUILayout.MinHeight(MinHeightOfInfoText)); } GUILayout.EndHorizontal(); } GUILayout.EndArea(); }