using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using HurricaneVR.Framework.Core; using HurricaneVR.Framework.Core.Utils; using HurricaneVR.Framework.Shared; using HurricaneVR.Framework.Shared.Utilities; using UnityEditor; using UnityEditor.ShortcutManagement; using UnityEngine; using UnityEngine.UIElements; namespace HurricaneVR.Editor { public class HVRSetupWindow : EditorWindow { private const string URLHurricaneReview = "https://assetstore.unity.com/packages/tools/physics/hurricane-vr-physics-interaction-toolkit-177300#reviews"; private const string URLKofi = "https://ko-fi.com/cloudwalkingames"; private const string URLPatreon = "https://www.patreon.com/user?u=46531723&fan_landing=true"; private const string URLBasicGrabbableWithPose = "https://www.youtube.com/watch?v=HZQ6QdMmZ34"; private const string URLVRIKIntegrationSetup = "https://cloudwalker2020.github.io/HurricaneVR-Docs/manual/integrations/finalik.html"; private const string LatestNotes = "HVRLatestReleaseNotes"; private const string URLManual = "https://cloudwalker2020.github.io/HurricaneVR-Docs/manual/intro.html"; private const string URLHandGrabber = "https://cloudwalker2020.github.io/HurricaneVR-Docs/manual/hands.html"; private const string URLSockets = "https://cloudwalker2020.github.io/HurricaneVR-Docs/manual/sockets.html"; private const string URLSetup = "https://cloudwalker2020.github.io/HurricaneVR-Docs/manual/setup.html"; private const string URLCustomHand = "https://cloudwalker2020.github.io/HurricaneVR-Docs/manual/hand_setup.html"; private const string URLDoor = "https://cloudwalker2020.github.io/HurricaneVR-Docs/manual/components/door.html"; private const string URLDiscord = "https://discord.com/invite/7QUXEcuwKY"; private const string DEFINESteamVR = "HVR_STEAMVR"; private const string DEFINEOculus = "HVR_OCULUS"; //private const string DEFINEPun = "HVR_PUN"; private static HVRSetupWindow _window; private VisualElement _root; private List _panels = new List(); [MenuItem("Tools/HurricaneVR/Setup")] public static void ShowWindow() { _window = GetWindow(true); _window.titleContent = new GUIContent("Hurricane v" + HVREditorManager.Version); _window.minSize = new Vector2(800f, 600f); } #if CLOUDWALKER [Shortcut("Refresh Window", KeyCode.F9)] public static void Refresh() { if (_window) { _window.Close(); } ShowWindow(); } #endif public void OnEnable() { _root = rootVisualElement; var visualTree = UnityEngine.Resources.Load("HVRSetupWindow"); _root.Add(visualTree.CloneTree()); var projectSetupPanel = _root.Q("ProjectSetupPanel"); var notesPanel = _root.Q("ReleaseNotesPanel"); var aboutPanel = _root.Q("AboutPanel"); _panels.Add(projectSetupPanel); _panels.Add(notesPanel); _panels.Add(aboutPanel); _root.Q