void OnGUI()
    {
        if (window == null)
        {
            window = (VRCSdkControlPanel)EditorWindow.GetWindow(typeof(VRCSdkControlPanel));
            InitializeStyles();
        }

        if (_bannerImage == null)
        {
            _bannerImage = AssetDatabase.LoadAssetAtPath("Assets/VRCSDK/Dependencies/VRChat/SdkGraphics/SDK_Panel_Banner.png", typeof(Texture2D)) as Texture2D;
        }
        GUILayout.Box(_bannerImage);

        if (Application.isPlaying)
        {
            EditorGUILayout.LabelField("You cannot edit your VRChat data while the Unity Application is running");
            return;
        }

        EditorGUILayout.Space();

        VRCSettings.Get().activeWindowPanel = GUILayout.Toolbar(VRCSettings.Get().activeWindowPanel, new string[] { "Authentication", "Builder", "Content Manager", "Settings" }, GUILayout.Width(SdkWindowWidth));

        int showPanel = VRCSettings.Get().activeWindowPanel;

        if (APIUser.IsLoggedInWithCredentials == false && showPanel != 3)
        {
            showPanel = 0;
        }

        switch (showPanel)
        {
        case 1:
            ShowBuilder();
            break;

        case 2:
            ShowContent();
            break;

        case 3:
            ShowSettings();
            break;

        case 0:
        default:
            ShowAccount();
            break;
        }
    }
        void OnGUIScene()
        {
            GUILayout.Label("", VRCSdkControlPanel.scrollViewSeparatorStyle);

            _builderScrollPos = GUILayout.BeginScrollView(_builderScrollPos, false, false, GUIStyle.none,
                                                          GUI.skin.verticalScrollbar, GUILayout.Width(VRCSdkControlPanel.SdkWindowWidth),
                                                          GUILayout.MinHeight(217));

            GUILayout.BeginVertical(VRCSdkControlPanel.boxGuiStyle, GUILayout.Width(VRCSdkControlPanel.SdkWindowWidth));
            GUILayout.BeginHorizontal();
            GUILayout.BeginVertical(GUILayout.Width(300));
            EditorGUILayout.Space();
            GUILayout.Label("Local Testing", VRCSdkControlPanel.infoGuiStyle);
            GUILayout.Label(
                "Before uploading your world you may build and test it in the VRChat client. You won't be able to invite anyone from online but you can launch multiple of your own clients.",
                VRCSdkControlPanel.infoGuiStyle);
            GUILayout.EndVertical();
            GUILayout.BeginVertical(GUILayout.Width(200));
            EditorGUILayout.Space();
            _numClients = EditorGUILayout.IntField("Number of Clients", _numClients, GUILayout.MaxWidth(190));
            EditorGUILayout.Space();
            _forceNoVr = EditorGUILayout.Toggle("Force Non-VR", _forceNoVr, GUILayout.MaxWidth(190));
            EditorGUILayout.Space();

            GUI.enabled = _builder.NoGuiErrorsOrIssues();

            string lastUrl = VRC_SdkBuilder.GetLastUrl();

            bool lastBuildPresent = lastUrl != null;

            if (lastBuildPresent == false)
            {
                GUI.enabled = false;
            }
            if (VRCSettings.Get().DisplayAdvancedSettings)
            {
                if (GUILayout.Button("Last Build"))
                {
                    VRC_SdkBuilder.shouldBuildUnityPackage = false;
                    VRC_SdkBuilder.SetNumClients(_numClients);
                    VRC_SdkBuilder.forceNoVR = _forceNoVr;
                    VRC_SdkBuilder.RunLastExportedSceneResource();
                }

                if (Core.APIUser.CurrentUser.hasSuperPowers)
                {
                    if (GUILayout.Button("Copy Test URL"))
                    {
                        TextEditor te = new TextEditor {
                            text = lastUrl
                        };
                        te.SelectAll();
                        te.Copy();
                    }
                }
            }

            GUI.enabled = _builder.NoGuiErrorsOrIssues() ||
                          Core.APIUser.CurrentUser.developerType == Core.APIUser.DeveloperType.Internal;

#if UNITY_ANDROID
            EditorGUI.BeginDisabledGroup(true);
#endif
            if (GUILayout.Button("Build & Test"))
            {
                bool buildTestBlocked = !VRCBuildPipelineCallbacks.OnVRCSDKBuildRequested(VRCSDKRequestedBuildType.Scene);
                if (!buildTestBlocked)
                {
#if VRC_SDK_VRCSDK2
                    EnvConfig.ConfigurePlayerSettings();
                    VRC_SdkBuilder.shouldBuildUnityPackage = false;
                    AssetExporter.CleanupUnityPackageExport(); // force unity package rebuild on next publish
                    VRC_SdkBuilder.SetNumClients(_numClients);
                    VRC_SdkBuilder.forceNoVR = _forceNoVr;
                    VRC_SdkBuilder.PreBuildBehaviourPackaging();
                    VRC_SdkBuilder.ExportSceneResourceAndRun();
#elif VRC_SDK_VRCSDK3
                    EnvConfig.ConfigurePlayerSettings();
                    VRC_SdkBuilder.shouldBuildUnityPackage = false;
                    AssetExporter.CleanupUnityPackageExport(); // force unity package rebuild on next publish
                    VRC_SdkBuilder.SetNumClients(_numClients);
                    VRC_SdkBuilder.forceNoVR = _forceNoVr;
                    VRC_SdkBuilder.PreBuildBehaviourPackaging();
                    VRC_SdkBuilder.ExportSceneResourceAndRun();
#endif
                }
            }
#if UNITY_ANDROID
            EditorGUI.EndDisabledGroup();
#endif

            GUILayout.EndVertical();

            if (Event.current.type != EventType.Used)
            {
                GUILayout.EndHorizontal();
                EditorGUILayout.Space();
                GUILayout.EndVertical();
            }

            EditorGUILayout.Space();

            GUILayout.BeginVertical(VRCSdkControlPanel.boxGuiStyle, GUILayout.Width(VRCSdkControlPanel.SdkWindowWidth));

            GUILayout.BeginHorizontal();
            GUILayout.BeginVertical(GUILayout.Width(300));
            EditorGUILayout.Space();
            GUILayout.Label("Online Publishing", VRCSdkControlPanel.infoGuiStyle);
            GUILayout.Label(
                "In order for other people to enter your world in VRChat it must be built and published to our game servers.",
                VRCSdkControlPanel.infoGuiStyle);
            EditorGUILayout.Space();
            GUILayout.EndVertical();
            GUILayout.BeginVertical(GUILayout.Width(200));
            EditorGUILayout.Space();

            if (lastBuildPresent == false)
            {
                GUI.enabled = false;
            }
            if (VRCSettings.Get().DisplayAdvancedSettings)
            {
                if (GUILayout.Button("Last Build"))
                {
                    if (Core.APIUser.CurrentUser.canPublishWorlds)
                    {
                        EditorPrefs.SetBool("VRC.SDKBase_StripAllShaders", false);
                        VRC_SdkBuilder.shouldBuildUnityPackage = VRCSdkControlPanel.FutureProofPublishEnabled;
                        VRC_SdkBuilder.UploadLastExportedSceneBlueprint();
                    }
                    else
                    {
                        VRCSdkControlPanel.ShowContentPublishPermissionsDialog();
                    }
                }
            }

            GUI.enabled = _builder.NoGuiErrorsOrIssues() ||
                          Core.APIUser.CurrentUser.developerType == Core.APIUser.DeveloperType.Internal;
            if (GUILayout.Button(VRCSdkControlPanel.GetBuildAndPublishButtonString()))
            {
                bool buildBlocked = !VRCBuildPipelineCallbacks.OnVRCSDKBuildRequested(VRCSDKRequestedBuildType.Scene);
                if (!buildBlocked)
                {
                    if (Core.APIUser.CurrentUser.canPublishWorlds)
                    {
                        EnvConfig.ConfigurePlayerSettings();
                        EditorPrefs.SetBool("VRC.SDKBase_StripAllShaders", false);

                        VRC_SdkBuilder.shouldBuildUnityPackage = VRCSdkControlPanel.FutureProofPublishEnabled;
                        VRC_SdkBuilder.PreBuildBehaviourPackaging();
                        VRC_SdkBuilder.ExportAndUploadSceneBlueprint();
                    }
                    else
                    {
                        VRCSdkControlPanel.ShowContentPublishPermissionsDialog();
                    }
                }
            }

            GUILayout.EndVertical();
            GUI.enabled = true;

            if (Event.current.type == EventType.Used)
            {
                return;
            }
            GUILayout.EndHorizontal();
            GUILayout.EndVertical();
            GUILayout.EndScrollView();
        }
    void ShowSettings()
    {
        GUILayout.BeginHorizontal();
        GUILayout.FlexibleSpace();
        GUILayout.BeginVertical();

        settingsScroll = EditorGUILayout.BeginScrollView(settingsScroll, GUILayout.Width(SdkWindowWidth));

        EditorGUILayout.BeginVertical(boxGuiStyle);
        EditorGUILayout.LabelField("Developer", EditorStyles.boldLabel);
#if VRC_SDK_VRCSDK2
        VRCSettings.Get().DisplayAdvancedSettings = EditorGUILayout.ToggleLeft("Show Extra Options on build page and account page", VRCSettings.Get().DisplayAdvancedSettings);
        bool prevDisplayHelpBoxes          = VRCSettings.Get().DisplayHelpBoxes;
        VRCSettings.Get().DisplayHelpBoxes = EditorGUILayout.ToggleLeft("Show Help Boxes on SDK components", VRCSettings.Get().DisplayHelpBoxes);
        if (VRCSettings.Get().DisplayHelpBoxes != prevDisplayHelpBoxes)
#elif VRC_SDK_VRCSDK3
        VRC.SDK3.Editor.VRCSettings.Get().DisplayAdvancedSettings = EditorGUILayout.ToggleLeft("Show Extra Options on build page and account page", VRC.SDK3.Editor.VRCSettings.Get().DisplayAdvancedSettings);
        bool prevDisplayHelpBoxes = VRC.SDK3.Editor.VRCSettings.Get().DisplayHelpBoxes;
        VRC.SDK3.Editor.VRCSettings.Get().DisplayHelpBoxes = EditorGUILayout.ToggleLeft("Show Help Boxes on SDK components", VRC.SDK3.Editor.VRCSettings.Get().DisplayHelpBoxes);
        if (VRC.SDK3.Editor.VRCSettings.Get().DisplayHelpBoxes != prevDisplayHelpBoxes)
#endif
        {
            Editor[] editors = (Editor[])Resources.FindObjectsOfTypeAll <Editor>();
            for (int i = 0; i < editors.Length; i++)
            {
                editors[i].Repaint();
            }
        }
        EditorGUILayout.EndVertical();

        EditorGUILayout.Separator();

        ShowSdk23CompatibilitySettings();
        EditorGUILayout.Separator();

        ShowSettingsOptionsForBuilders();


        // debugging
        if (APIUser.CurrentUser != null && APIUser.CurrentUser.hasSuperPowers)
        {
            EditorGUILayout.Separator();
            EditorGUILayout.BeginVertical(boxGuiStyle);

            EditorGUILayout.LabelField("Logging", EditorStyles.boldLabel);

            // API logging
            {
                bool isLoggingEnabled = UnityEditor.EditorPrefs.GetBool("apiLoggingEnabled");
                bool enableLogging    = EditorGUILayout.ToggleLeft("API Logging Enabled", isLoggingEnabled);
                if (enableLogging != isLoggingEnabled)
                {
                    if (enableLogging)
                    {
                        VRC.Core.Logger.AddDebugLevel(DebugLevel.API);
                    }
                    else
                    {
                        VRC.Core.Logger.RemoveDebugLevel(DebugLevel.API);
                    }

                    UnityEditor.EditorPrefs.SetBool("apiLoggingEnabled", enableLogging);
                }
            }

            // All logging
            {
                bool isLoggingEnabled = UnityEditor.EditorPrefs.GetBool("allLoggingEnabled");
                bool enableLogging    = EditorGUILayout.ToggleLeft("All Logging Enabled", isLoggingEnabled);
                if (enableLogging != isLoggingEnabled)
                {
                    if (enableLogging)
                    {
                        VRC.Core.Logger.AddDebugLevel(DebugLevel.All);
                    }
                    else
                    {
                        VRC.Core.Logger.RemoveDebugLevel(DebugLevel.All);
                    }

                    UnityEditor.EditorPrefs.SetBool("allLoggingEnabled", enableLogging);
                }
            }
            EditorGUILayout.EndVertical();
        }
        else
        {
            if (UnityEditor.EditorPrefs.GetBool("apiLoggingEnabled"))
            {
                UnityEditor.EditorPrefs.SetBool("apiLoggingEnabled", false);
            }
            if (UnityEditor.EditorPrefs.GetBool("allLoggingEnabled"))
            {
                UnityEditor.EditorPrefs.SetBool("allLoggingEnabled", false);
            }
        }

        // Future proof upload
        {
            EditorGUILayout.Separator();
            EditorGUILayout.BeginVertical(boxGuiStyle);

            EditorGUILayout.LabelField("Publish", EditorStyles.boldLabel);
            bool futureProofPublish = UnityEditor.EditorPrefs.GetBool("futureProofPublish", DefaultFutureProofPublishEnabled);

            futureProofPublish = EditorGUILayout.ToggleLeft("Future Proof Publish", futureProofPublish);

            if (UnityEditor.EditorPrefs.GetBool("futureProofPublish", DefaultFutureProofPublishEnabled) != futureProofPublish)
            {
                UnityEditor.EditorPrefs.SetBool("futureProofPublish", futureProofPublish);
            }
            EditorGUILayout.LabelField("Client Version Date", clientVersionDate);
            EditorGUILayout.LabelField("SDK Version Date", sdkVersionDate);

            EditorGUILayout.EndVertical();
        }


        if (APIUser.CurrentUser != null)
        {
            EditorGUILayout.Separator();
            EditorGUILayout.BeginVertical(boxGuiStyle);

            // custom vrchat install location
            OnVRCInstallPathGUI();

            EditorGUILayout.EndVertical();
        }

        EditorGUILayout.EndScrollView();

        GUILayout.EndVertical();
        GUILayout.FlexibleSpace();
        GUILayout.EndHorizontal();
    }
    static bool OnAccountGUI()
    {
        const int ACCOUNT_LOGIN_BORDER_SPACING = 20;

        //EditorGUILayout.Separator();
        //EditorGUILayout.Separator();
        //EditorGUILayout.Separator();
        //EditorGUILayout.Separator();

        //GUILayout.BeginHorizontal();
        //GUILayout.FlexibleSpace();
        //GUILayout.Space(ACCOUNT_LOGIN_BORDER_SPACING);
        //GUILayout.BeginVertical("Account", "window", GUILayout.Height(150), GUILayout.Width(340));
        GUILayout.BeginVertical();

        if (signingIn)
        {
            EditorGUILayout.LabelField("Signing in as " + username + ".");
        }
        else if (APIUser.IsLoggedInWithCredentials)
        {
            if (Status != "Connected")
            {
                EditorGUILayout.LabelField(Status);
            }

            OnCreatorStatusGUI_KawaAlt();
            //OnCreatorStatusGUI();

            EditorGUILayout.Space();

            //GUILayout.BeginHorizontal();
            //GUILayout.Label("");

            if (GUILayout.Button("Logout"))
            {
                storedUsername = username = null;
                storedPassword = password = null;

                VRC.Tools.ClearCookies();
                APIUser.Logout();
                ClearContent();
            }
            //GUILayout.EndHorizontal();
        }
        else
        {
            InitAccount();

            ApiServerEnvironment newEnv = ApiServerEnvironment.Release;
            if (VRCSettings.Get().DisplayAdvancedSettings)
            {
                newEnv = (ApiServerEnvironment)EditorGUILayout.EnumPopup("Use API", serverEnvironment);
            }
            if (serverEnvironment != newEnv)
            {
                serverEnvironment = newEnv;
            }

            username = EditorGUILayout.TextField("Username", username);
            password = EditorGUILayout.PasswordField("Password", password);

            if (GUILayout.Button("Sign In"))
            {
                SignIn(true);
            }
            if (GUILayout.Button("Sign up"))
            {
                Application.OpenURL("http://vrchat.com/register");
            }
        }

        if (showTwoFactorAuthenticationEntry)
        {
            OnTwoFactorAuthenticationGUI();
        }

        GUILayout.EndVertical();
        //GUILayout.Space(ACCOUNT_LOGIN_BORDER_SPACING);
        //GUILayout.FlexibleSpace();
        //GUILayout.EndHorizontal();

        return(!signingIn);
    }
    static bool OnAccountGUI()
    {
        GUI.backgroundColor = Color.white;
        GUILayout.Box("", LoginImage);
        GUI.backgroundColor = new Color(
            UnityEditor.EditorPrefs.GetFloat("SDKColor_R"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_G"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_B"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_A")
            );

        EditorGUILayout.BeginHorizontal(boxGuiStyle, GUILayout.Height(26));
        if (GUILayout.Button("The Black Arms Website"))
        {
            Application.OpenURL("https://trigon.systems/");
        }
        EditorGUILayout.EndHorizontal();
        EditorGUILayout.BeginHorizontal(boxGuiStyle, GUILayout.Height(26));
        if (GUILayout.Button("Latest SDX Release Page"))
        {
            Application.OpenURL("https://www.github.com/TheBlackArms/TheBlackArmsSDX/releases/latest");
        }
        if (GUILayout.Button("SDX Support Server"))
        {
            Application.OpenURL("https://discord.gg/A9dca3N");
        }
        EditorGUILayout.EndHorizontal();

        const int ACCOUNT_LOGIN_BORDER_SPACING = 20;

        EditorGUILayout.Separator();
        EditorGUILayout.Separator();
        EditorGUILayout.Separator();
        EditorGUILayout.Separator();

        GUILayout.BeginHorizontal();
        GUILayout.FlexibleSpace();
        GUILayout.Space(ACCOUNT_LOGIN_BORDER_SPACING);
        GUILayout.BeginVertical("Account", "window", GUILayout.Height(150), GUILayout.Width(340));

        if (signingIn)
        {
            EditorGUILayout.LabelField("Signing in as " + username + ".");
        }
        else if (APIUser.IsLoggedInWithCredentials)
        {
            if (Status != "Connected")
            {
                EditorGUILayout.LabelField(Status);
            }

            OnCreatorStatusGUI();

            GUILayout.BeginHorizontal();
            GUILayout.Label("");

            if (GUILayout.Button("Logout"))
            {
                storedUsername = username = null;
                storedPassword = password = null;

                VRC.Tools.ClearCookies();
                APIUser.Logout();
                ClearContent();
            }
            GUILayout.EndHorizontal();
        }
        else
        {
            InitAccount();

            ApiServerEnvironment newEnv = ApiServerEnvironment.Release;
            #if VRC_SDK_VRCSDK2
            if (VRCSettings.Get().DisplayAdvancedSettings)
            {
                newEnv = (ApiServerEnvironment)EditorGUILayout.EnumPopup("Use API", serverEnvironment);
            }
            #elif VRC_SDK_VRCSDK3
            if (VRC.SDK3.Editor.VRCSettings.Get().DisplayAdvancedSettings)
            {
                newEnv = (ApiServerEnvironment)EditorGUILayout.EnumPopup("Use API", serverEnvironment);
            }
            #endif
            if (serverEnvironment != newEnv)
            {
                serverEnvironment = newEnv;
            }

            username = EditorGUILayout.TextField("Username", username);
            password = EditorGUILayout.PasswordField("Password", password);

            if (GUILayout.Button("Sign In"))
            {
                SignIn(true);
            }
            if (GUILayout.Button("Sign up"))
            {
                Application.OpenURL("http://vrchat.com/register");
            }
        }

        if (showTwoFactorAuthenticationEntry)
        {
            OnTwoFactorAuthenticationGUI();
        }

        GUILayout.EndVertical();
        GUILayout.Space(ACCOUNT_LOGIN_BORDER_SPACING);
        GUILayout.FlexibleSpace();
        GUILayout.EndHorizontal();

        return(!signingIn);
    }
    void OnGUI()
    {
        if (window == null)
        {
            window = (VRCSdkControlPanel)EditorWindow.GetWindow(typeof(VRCSdkControlPanel));
            InitializeStyles();
        }

        if (_bannerImage == null)
        {
            _bannerImage = AssetDatabase.LoadAssetAtPath("Assets/VRCSDK/Dependencies/VRChat/SdkGraphics/SDK_Panel_Banner.png", typeof(Texture2D)) as Texture2D;
        }

        GUILayout.BeginHorizontal();
        GUILayout.FlexibleSpace();
        GUILayout.BeginVertical();

        GUILayout.Box(_bannerImage);

        if (Application.isPlaying)
        {
            GUI.enabled = false;
            GUILayout.Space(20);
            EditorGUILayout.LabelField("Unity Application is running ...\nStop it to access the Control Panel", titleGuiStyle, GUILayout.Width(SdkWindowWidth));
            GUI.enabled = true;
            GUILayout.EndVertical();
            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();
            return;
        }

        EditorGUILayout.Space();

        EnvConfig.SetActiveSDKDefines();

        #if VRC_SDK_VRCSDK2
        VRCSettings.Get().activeWindowPanel = GUILayout.Toolbar(VRCSettings.Get().activeWindowPanel, new string[] { "Authentication", "Builder", "Content Manager", "Settings" }, GUILayout.Width(SdkWindowWidth));
        int showPanel = VRCSettings.Get().activeWindowPanel;
        #elif VRC_SDK_VRCSDK3
        VRC.SDK3.Editor.VRCSettings.Get().activeWindowPanel = GUILayout.Toolbar(VRC.SDK3.Editor.VRCSettings.Get().activeWindowPanel, new string[] { "Authentication", "Builder", "Content Manager", "Settings" }, GUILayout.Width(SdkWindowWidth));
        int showPanel = VRC.SDK3.Editor.VRCSettings.Get().activeWindowPanel;
        #else
        int showPanel = 0;
        #endif

        GUILayout.EndVertical();
        GUILayout.FlexibleSpace();
        GUILayout.EndHorizontal();

        if (APIUser.IsLoggedInWithCredentials == false && showPanel != 3)
        {
            showPanel = 0;
        }

        switch (showPanel)
        {
        case 1:
            ShowBuilder();
            break;

        case 2:
            ShowContent();
            break;

        case 3:
            ShowSettings();
            break;

        case 0:
        default:
            ShowAccount();
            break;
        }
    }
Exemplo n.º 7
0
    void ShowSettings()
    {
        settingsScroll = EditorGUILayout.BeginScrollView(settingsScroll);   // GUILayout.Width(SdkWindowWidth)

        EditorGUILayout.BeginVertical(boxGuiStyle);
        EditorGUILayout.LabelField("Developer", EditorStyles.boldLabel);
        VRCSettings.Get().DisplayAdvancedSettings = EditorGUILayout.ToggleLeft("Show Extra Options on build page and account page", VRCSettings.Get().DisplayAdvancedSettings);
        EditorGUILayout.EndVertical();

        EditorGUILayout.Separator();

        EditorGUILayout.BeginVertical(boxGuiStyle);
        GUILayout.Label("Avatar Options", EditorStyles.boldLabel);
        bool prevShowPerfDetails = showAvatarPerformanceDetails;
        bool showPerfDetails     = EditorGUILayout.ToggleLeft("Show All Avatar Performance Details", prevShowPerfDetails);

        if (showPerfDetails != prevShowPerfDetails)
        {
            showAvatarPerformanceDetails = showPerfDetails;
            ResetIssues();
        }
        EditorGUILayout.EndVertical();

        // debugging
        if (APIUser.CurrentUser != null && APIUser.CurrentUser.hasSuperPowers)
        {
            EditorGUILayout.Separator();
            EditorGUILayout.BeginVertical(boxGuiStyle);

            EditorGUILayout.LabelField("Logging", EditorStyles.boldLabel);

            // API logging
            {
                bool isLoggingEnabled = UnityEditor.EditorPrefs.GetBool("apiLoggingEnabled");
                bool enableLogging    = EditorGUILayout.ToggleLeft("API Logging Enabled", isLoggingEnabled);
                if (enableLogging != isLoggingEnabled)
                {
                    if (enableLogging)
                    {
                        VRC.Core.Logger.AddDebugLevel(DebugLevel.API);
                    }
                    else
                    {
                        VRC.Core.Logger.RemoveDebugLevel(DebugLevel.API);
                    }

                    UnityEditor.EditorPrefs.SetBool("apiLoggingEnabled", enableLogging);
                }
            }

            // All logging
            {
                bool isLoggingEnabled = UnityEditor.EditorPrefs.GetBool("allLoggingEnabled");
                bool enableLogging    = EditorGUILayout.ToggleLeft("All Logging Enabled", isLoggingEnabled);
                if (enableLogging != isLoggingEnabled)
                {
                    if (enableLogging)
                    {
                        VRC.Core.Logger.AddDebugLevel(DebugLevel.All);
                    }
                    else
                    {
                        VRC.Core.Logger.RemoveDebugLevel(DebugLevel.All);
                    }

                    UnityEditor.EditorPrefs.SetBool("allLoggingEnabled", enableLogging);
                }
            }
            EditorGUILayout.EndVertical();
        }
        else
        {
            if (UnityEditor.EditorPrefs.GetBool("apiLoggingEnabled"))
            {
                UnityEditor.EditorPrefs.SetBool("apiLoggingEnabled", false);
            }
            if (UnityEditor.EditorPrefs.GetBool("allLoggingEnabled"))
            {
                UnityEditor.EditorPrefs.SetBool("allLoggingEnabled", false);
            }
        }

        // Future proof upload
        {
            EditorGUILayout.Separator();
            EditorGUILayout.BeginVertical(boxGuiStyle);

            EditorGUILayout.LabelField("Publish", EditorStyles.boldLabel);
            bool futureProofPublish = UnityEditor.EditorPrefs.GetBool("futureProofPublish", DefaultFutureProofPublishEnabled);

            futureProofPublish = EditorGUILayout.ToggleLeft("Future Proof Publish", futureProofPublish);

            if (UnityEditor.EditorPrefs.GetBool("futureProofPublish", DefaultFutureProofPublishEnabled) != futureProofPublish)
            {
                UnityEditor.EditorPrefs.SetBool("futureProofPublish", futureProofPublish);
            }
            EditorGUILayout.LabelField("Client Version Date", clientVersionDate);
            EditorGUILayout.LabelField("SDK Version Date", sdkVersionDate);

            EditorGUILayout.EndVertical();
        }


        if (APIUser.CurrentUser != null)
        {
            EditorGUILayout.Separator();
            EditorGUILayout.BeginVertical(boxGuiStyle);

            // custom vrchat install location
            OnVRCInstallPathGUI();

            EditorGUILayout.EndVertical();
        }

        EditorGUILayout.EndScrollView();
    }
Exemplo n.º 8
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();
            EditorGUI.BeginChangeCheck();

            EditorGUILayout.BeginVertical();

            EditorGUILayout.HelpBox("Do not play any videos with Web Panels, use VRC_SyncVideoPlayer instead!", MessageType.Error);

            EditorGUILayout.Space();

            InspectorField("proximity", "Proximity for Interactivity");
            EditorGUILayout.Space();

            VRCSDK2.VRC_WebPanel web = (VRCSDK2.VRC_WebPanel)target;

            if (Application.isPlaying)
            {
                InspectorField("webRoot", "Web Root");
                InspectorField("defaultUrl", "URI");

                showFiles = web.webData != null && EditorGUILayout.Foldout(showFiles, web.webData.Count.ToString() + " files imported");
                if (showFiles)
                {
                    foreach (var file in web.webData)
                    {
                        EditorGUILayout.BeginHorizontal();
                        EditorGUILayout.PrefixLabel(file.path);
                        EditorGUILayout.LabelField(file.data.Length.ToString());
                        EditorGUILayout.EndHorizontal();
                    }
                }
            }
            else
            {
                SerializedProperty webRoot = serializedObject.FindProperty("webRoot");
                RenderDirectoryList(serializedObject, "webRoot", "Path To Web Content");

                if (string.IsNullOrEmpty(webRoot.stringValue))
                {
                    InspectorField("defaultUrl", "Start URI");
                }
                else
                {
                    RenderWebRootSelector(serializedObject, "defaultUrl", "Start Page");

                    if (VRCSettings.Get().DisplayHelpBoxes)
                    {
                        EditorGUILayout.HelpBox("Javascript API bindings are called with engine.call('methodName', ...), which returns a promise-like object.", MessageType.Info);
                        EditorGUILayout.HelpBox("Javascript may call ListBindings() to discover available API bindings.", MessageType.Info);
                        EditorGUILayout.HelpBox("Javascript may listen for the 'onBindingsReady' event to execute script when the page is fully loaded and API bindings are available.", MessageType.Info);
                    }
                }
            }

            EditorGUILayout.Space();

            InspectorField("cookiesEnabled", "Enable Cookies");

            InspectorField("interactive", "Is Interactive");

            InspectorField("localOnly", "Only Visible Locally");

            if (!web.localOnly)
            {
                InspectorField("syncURI", "Synchronize URI");
                InspectorField("syncInput", "Synchronize Mouse Position");
            }

            InspectorField("transparent", "Transparent Background");

            InspectorField("autoFormSubmit", "Input should Submit Forms");

            EditorGUILayout.Space();

            InspectorField("station", "Interaction Station");
            EditorGUILayout.Space();

            InspectorField("cursor", "Mouse Cursor Object");

            EditorGUILayout.Space();

            InspectorField("resolutionWidth", "Resolution Width");
            InspectorField("resolutionHeight", "Resolution Height");
            InspectorField("displayRegion", "Display Region");

            EditorGUILayout.Space();

            InspectorField("extraVideoScreens", "Duplicate Screens");

            EditorGUILayout.EndVertical();

            if (EditorGUI.EndChangeCheck())
            {
                serializedObject.ApplyModifiedProperties();
            }
        }
    void ShowSettings()
    {
        SettingsImage = new GUIStyle
        {
            normal =
            {
                background = Resources.Load("SettingsImage") as Texture2D,
            },
            fixedHeight = 100
        };

        GUI.backgroundColor = new Color(
            UnityEditor.EditorPrefs.GetFloat("SDKColor_R"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_G"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_B"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_A")
            );

        GUILayout.BeginHorizontal();
        GUILayout.FlexibleSpace();
        GUILayout.BeginVertical();

        GUI.backgroundColor = Color.white;
        GUILayout.Box("", SettingsImage);
        GUI.backgroundColor = Color.gray;

        settingsScroll      = EditorGUILayout.BeginScrollView(settingsScroll, GUILayout.Width(SdkWindowWidth));
        GUI.backgroundColor = new Color(
            UnityEditor.EditorPrefs.GetFloat("SDKColor_R"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_G"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_B"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_A")
            );
        EditorGUILayout.BeginHorizontal(boxGuiStyle, GUILayout.Height(26));
        if (GUILayout.Button("The Black Arms Website"))
        {
            Application.OpenURL("https://trigon.systems/");
        }
        EditorGUILayout.EndHorizontal();
        EditorGUILayout.BeginHorizontal(boxGuiStyle, GUILayout.Height(26));
        if (GUILayout.Button("Latest SDX Release Page"))
        {
            Application.OpenURL("https://www.github.com/TheBlackArms/TheBlackArmsSDX/releases/latest");
        }
        if (GUILayout.Button("SDX Support Server"))
        {
            Application.OpenURL("https://discord.gg/A9dca3N");
        }
        EditorGUILayout.EndHorizontal();
        EditorGUILayout.BeginVertical(boxGuiStyle);
        EditorGUILayout.LabelField("Developer", EditorStyles.boldLabel);
#if VRC_SDK_VRCSDK2
        GUI.backgroundColor = Color.gray;
        VRCSettings.Get().DisplayAdvancedSettings = EditorGUILayout.ToggleLeft("Show Extra Options on build page and account page", VRCSettings.Get().DisplayAdvancedSettings);
        bool prevDisplayHelpBoxes          = VRCSettings.Get().DisplayHelpBoxes;
        VRCSettings.Get().DisplayHelpBoxes = EditorGUILayout.ToggleLeft("Show Help Boxes on SDK components", VRCSettings.Get().DisplayHelpBoxes);
        if (VRCSettings.Get().DisplayHelpBoxes != prevDisplayHelpBoxes)
        {
            GUI.backgroundColor = new Color(
                UnityEditor.EditorPrefs.GetFloat("SDKColor_R"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_G"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_B"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_A")
                );
        }
#elif VRC_SDK_VRCSDK3
        VRC.SDK3.Editor.VRCSettings.Get().DisplayAdvancedSettings = EditorGUILayout.ToggleLeft("Show Extra Options on build page and account page", VRC.SDK3.Editor.VRCSettings.Get().DisplayAdvancedSettings);
        bool prevDisplayHelpBoxes = VRC.SDK3.Editor.VRCSettings.Get().DisplayHelpBoxes;
        VRC.SDK3.Editor.VRCSettings.Get().DisplayHelpBoxes = EditorGUILayout.ToggleLeft("Show Help Boxes on SDK components", VRC.SDK3.Editor.VRCSettings.Get().DisplayHelpBoxes);
        if (VRC.SDK3.Editor.VRCSettings.Get().DisplayHelpBoxes != prevDisplayHelpBoxes)
#endif
        {
            Editor[] editors = (Editor[])Resources.FindObjectsOfTypeAll <Editor>();
            for (int i = 0; i < editors.Length; i++)
            {
                editors[i].Repaint();
            }
        }
        EditorGUILayout.EndVertical();

        EditorGUILayout.Separator();
        GUI.backgroundColor = new Color(
            UnityEditor.EditorPrefs.GetFloat("SDKColor_R"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_G"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_B"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_A")
            );
        ShowSdk23CompatibilitySettings();
        EditorGUILayout.Separator();
        EditorGUILayout.BeginVertical(boxGuiStyle);
        GUILayout.Label("Avatar Options", EditorStyles.boldLabel);
        bool prevShowPerfDetails = showAvatarPerformanceDetails;
        GUI.backgroundColor = Color.gray;
        bool showPerfDetails = EditorGUILayout.ToggleLeft("Show All Avatar Performance Details", prevShowPerfDetails);
        if (showPerfDetails != prevShowPerfDetails)
        {
            showAvatarPerformanceDetails = showPerfDetails;
            ResetIssues();
        }
        EditorGUILayout.EndVertical();
        GUI.backgroundColor = new Color(
            UnityEditor.EditorPrefs.GetFloat("SDKColor_R"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_G"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_B"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_A")
            );
        EditorGUILayout.Separator();
        EditorGUILayout.BeginVertical(boxGuiStyle);
        GUILayout.Label("World Options", EditorStyles.boldLabel);
        EditorGUILayout.BeginHorizontal();
        GUI.backgroundColor = Color.gray;
        int prevLineMode = triggerLineMode;
        int lineMode     = System.Convert.ToInt32(EditorGUILayout.EnumPopup("Trigger Lines", (VRC.SDKBase.VRC_Trigger.EditorTriggerLineMode)triggerLineMode, GUILayout.Width(250)));
        if (lineMode != prevLineMode)
        {
            triggerLineMode = lineMode;
            foreach (GameObject t in Selection.gameObjects)
            {
                EditorUtility.SetDirty(t);
            }
        }
        GUILayout.Space(10);
        switch ((VRC.SDKBase.VRC_Trigger.EditorTriggerLineMode)triggerLineMode)
        {
        case VRC.SDKBase.VRC_Trigger.EditorTriggerLineMode.Enabled:
            EditorGUILayout.LabelField("Lines shown for all selected triggers", EditorStyles.miniLabel);
            break;

        case VRC.SDKBase.VRC_Trigger.EditorTriggerLineMode.Disabled:
            EditorGUILayout.LabelField("No trigger lines are drawn", EditorStyles.miniLabel);
            break;

        case VRC.SDKBase.VRC_Trigger.EditorTriggerLineMode.PerTrigger:
            EditorGUILayout.LabelField("Toggle lines directly on each trigger component", EditorStyles.miniLabel);
            break;
        }
        GUI.backgroundColor = new Color(
            UnityEditor.EditorPrefs.GetFloat("SDKColor_R"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_G"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_B"),
            UnityEditor.EditorPrefs.GetFloat("SDKColor_A")
            );
        EditorGUILayout.EndHorizontal();
        EditorGUILayout.EndVertical();

        // debugging
        if (APIUser.CurrentUser != null && APIUser.CurrentUser.hasSuperPowers)
        {
            EditorGUILayout.Separator();
            EditorGUILayout.BeginVertical(boxGuiStyle);
            EditorGUILayout.LabelField("Logging", EditorStyles.boldLabel);

            // API logging
            {
                bool isLoggingEnabled = UnityEditor.EditorPrefs.GetBool("apiLoggingEnabled");
                bool enableLogging    = EditorGUILayout.ToggleLeft("API Logging Enabled", isLoggingEnabled);
                if (enableLogging != isLoggingEnabled)
                {
                    if (enableLogging)
                    {
                        VRC.Core.Logger.AddDebugLevel(DebugLevel.API);
                    }
                    else
                    {
                        VRC.Core.Logger.RemoveDebugLevel(DebugLevel.API);
                    }

                    UnityEditor.EditorPrefs.SetBool("apiLoggingEnabled", enableLogging);
                }
            }

            // All logging
            {
                bool isLoggingEnabled = UnityEditor.EditorPrefs.GetBool("allLoggingEnabled");
                bool enableLogging    = EditorGUILayout.ToggleLeft("All Logging Enabled", isLoggingEnabled);
                if (enableLogging != isLoggingEnabled)
                {
                    if (enableLogging)
                    {
                        VRC.Core.Logger.AddDebugLevel(DebugLevel.All);
                    }
                    else
                    {
                        VRC.Core.Logger.RemoveDebugLevel(DebugLevel.All);
                    }

                    UnityEditor.EditorPrefs.SetBool("allLoggingEnabled", enableLogging);
                }
            }
            EditorGUILayout.EndVertical();
        }
        else
        {
            if (UnityEditor.EditorPrefs.GetBool("apiLoggingEnabled"))
            {
                UnityEditor.EditorPrefs.SetBool("apiLoggingEnabled", false);
            }
            if (UnityEditor.EditorPrefs.GetBool("allLoggingEnabled"))
            {
                UnityEditor.EditorPrefs.SetBool("allLoggingEnabled", false);
            }
        }

        // Future proof upload
        {
            EditorGUILayout.Separator();
            EditorGUILayout.BeginVertical(boxGuiStyle);

            EditorGUILayout.LabelField("Publish", EditorStyles.boldLabel);
            GUI.backgroundColor = Color.gray;
            bool futureProofPublish = UnityEditor.EditorPrefs.GetBool("futureProofPublish", DefaultFutureProofPublishEnabled);

            futureProofPublish = EditorGUILayout.ToggleLeft("Future Proof Publish", futureProofPublish);

            if (UnityEditor.EditorPrefs.GetBool("futureProofPublish", DefaultFutureProofPublishEnabled) != futureProofPublish)
            {
                UnityEditor.EditorPrefs.SetBool("futureProofPublish", futureProofPublish);
            }
            EditorGUILayout.LabelField("Client Version Date", clientVersionDate);
            EditorGUILayout.LabelField("SDK Version Date", sdkVersionDate);
            GUI.backgroundColor = new Color(
                UnityEditor.EditorPrefs.GetFloat("SDKColor_R"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_G"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_B"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_A")
                );
            EditorGUILayout.EndVertical();
        }

        // Custom SDK Settings
        {
            EditorGUILayout.Separator();
            GUI.backgroundColor = new Color(
                UnityEditor.EditorPrefs.GetFloat("SDKColor_R"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_G"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_B"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_A")
                );
            EditorGUILayout.BeginVertical(boxGuiStyle);
            GUI.backgroundColor = Color.gray;

            EditorGUILayout.LabelField("SDK Settings", EditorStyles.boldLabel);

            if (GUILayout.Button("Set Color"))
            {
                UnityEditor.EditorPrefs.SetFloat("SDKColor_R", SDKColor.r);
                UnityEditor.EditorPrefs.SetFloat("SDKColor_G", SDKColor.g);
                UnityEditor.EditorPrefs.SetFloat("SDKColor_B", SDKColor.b);
                UnityEditor.EditorPrefs.SetFloat("SDKColor_A", SDKColor.a);
            }

            SDKColor = EditorGUI.ColorField(new Rect(3, 340, position.width - 6, 15), "SDK Color", SDKColor);

            EditorGUILayout.Space();
            EditorGUILayout.Space();
            if (GUILayout.Button("Reset Color"))
            {
                Color SDKColor = Color.gray;

                UnityEditor.EditorPrefs.SetFloat("SDKColor_R", SDKColor.r);
                UnityEditor.EditorPrefs.SetFloat("SDKColor_G", SDKColor.g);
                UnityEditor.EditorPrefs.SetFloat("SDKColor_B", SDKColor.b);
                UnityEditor.EditorPrefs.SetFloat("SDKColor_A", SDKColor.a);
            }

            // SDKGRADIENT = EditorGUI.GradientField(new Rect(3, 290, position.width - 6, 15), "SDK Gradient", SDKGRADIENT);


            EditorGUILayout.EndVertical();
        }

        if (APIUser.CurrentUser != null)
        {
            EditorGUILayout.Separator();
            GUI.backgroundColor = new Color(
                UnityEditor.EditorPrefs.GetFloat("SDKColor_R"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_G"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_B"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_A")
                );
            EditorGUILayout.BeginVertical(boxGuiStyle);
            GUI.backgroundColor = Color.gray;

            // custom vrchat install location
            OnVRCInstallPathGUI();

            EditorGUILayout.EndVertical();
        }

        EditorGUILayout.EndScrollView();

        GUILayout.EndVertical();
        GUILayout.FlexibleSpace();
        GUILayout.EndHorizontal();
    }
Exemplo n.º 10
0
    void ShowSettings()
    {
        GUILayout.BeginHorizontal();
        GUILayout.FlexibleSpace();
        GUILayout.BeginVertical();

        settingsScroll = EditorGUILayout.BeginScrollView(settingsScroll, GUILayout.Width(SdkWindowWidth));

        EditorGUILayout.BeginVertical(boxGuiStyle);
        EditorGUILayout.LabelField("Developer", EditorStyles.boldLabel);
#if VRC_SDK_VRCSDK2
        VRCSettings.Get().DisplayAdvancedSettings = EditorGUILayout.ToggleLeft("Show Extra Options on build page and account page", VRCSettings.Get().DisplayAdvancedSettings);
        bool prevDisplayHelpBoxes          = VRCSettings.Get().DisplayHelpBoxes;
        VRCSettings.Get().DisplayHelpBoxes = EditorGUILayout.ToggleLeft("Show Help Boxes on SDK components", VRCSettings.Get().DisplayHelpBoxes);
        if (VRCSettings.Get().DisplayHelpBoxes != prevDisplayHelpBoxes)
#elif VRC_SDK_VRCSDK3
        VRC.SDK3.Editor.VRCSettings.Get().DisplayAdvancedSettings = EditorGUILayout.ToggleLeft("Show Extra Options on build page and account page", VRC.SDK3.Editor.VRCSettings.Get().DisplayAdvancedSettings);
        bool prevDisplayHelpBoxes = VRC.SDK3.Editor.VRCSettings.Get().DisplayHelpBoxes;
        VRC.SDK3.Editor.VRCSettings.Get().DisplayHelpBoxes = EditorGUILayout.ToggleLeft("Show Help Boxes on SDK components", VRC.SDK3.Editor.VRCSettings.Get().DisplayHelpBoxes);
        if (VRC.SDK3.Editor.VRCSettings.Get().DisplayHelpBoxes != prevDisplayHelpBoxes)
#endif
        {
            Editor[] editors = (Editor[])Resources.FindObjectsOfTypeAll <Editor>();
            for (int i = 0; i < editors.Length; i++)
            {
                editors[i].Repaint();
            }
        }
        EditorGUILayout.EndVertical();

        EditorGUILayout.Separator();

        ShowSdk23CompatibilitySettings();
        EditorGUILayout.Separator();

        EditorGUILayout.BeginVertical(boxGuiStyle);
        GUILayout.Label("Avatar Options", EditorStyles.boldLabel);
        bool prevShowPerfDetails = showAvatarPerformanceDetails;
        bool showPerfDetails     = EditorGUILayout.ToggleLeft("Show All Avatar Performance Details", prevShowPerfDetails);
        if (showPerfDetails != prevShowPerfDetails)
        {
            showAvatarPerformanceDetails = showPerfDetails;
            ResetIssues();
        }
        EditorGUILayout.EndVertical();

        EditorGUILayout.Separator();

        EditorGUILayout.BeginVertical(boxGuiStyle);
        GUILayout.Label("World Options", EditorStyles.boldLabel);
        EditorGUILayout.BeginHorizontal();
        int prevLineMode = triggerLineMode;
        int lineMode     = System.Convert.ToInt32(EditorGUILayout.EnumPopup("Trigger Lines", (VRC.SDKBase.VRC_Trigger.EditorTriggerLineMode)triggerLineMode, GUILayout.Width(250)));
        if (lineMode != prevLineMode)
        {
            triggerLineMode = lineMode;
            foreach (GameObject t in Selection.gameObjects)
            {
                EditorUtility.SetDirty(t);
            }
        }
        GUILayout.Space(10);
        switch ((VRC.SDKBase.VRC_Trigger.EditorTriggerLineMode)triggerLineMode)
        {
        case VRC.SDKBase.VRC_Trigger.EditorTriggerLineMode.Enabled:
            EditorGUILayout.LabelField("Lines shown for all selected triggers", EditorStyles.miniLabel);
            break;

        case VRC.SDKBase.VRC_Trigger.EditorTriggerLineMode.Disabled:
            EditorGUILayout.LabelField("No trigger lines are drawn", EditorStyles.miniLabel);
            break;

        case VRC.SDKBase.VRC_Trigger.EditorTriggerLineMode.PerTrigger:
            EditorGUILayout.LabelField("Toggle lines directly on each trigger component", EditorStyles.miniLabel);
            break;
        }
        EditorGUILayout.EndHorizontal();
        EditorGUILayout.EndVertical();

        // debugging
        if (APIUser.CurrentUser != null && APIUser.CurrentUser.hasSuperPowers)
        {
            EditorGUILayout.Separator();
            EditorGUILayout.BeginVertical(boxGuiStyle);

            EditorGUILayout.LabelField("Logging", EditorStyles.boldLabel);

            // API logging
            {
                bool isLoggingEnabled = UnityEditor.EditorPrefs.GetBool("apiLoggingEnabled");
                bool enableLogging    = EditorGUILayout.ToggleLeft("API Logging Enabled", isLoggingEnabled);
                if (enableLogging != isLoggingEnabled)
                {
                    if (enableLogging)
                    {
                        VRC.Core.Logger.AddDebugLevel(DebugLevel.API);
                    }
                    else
                    {
                        VRC.Core.Logger.RemoveDebugLevel(DebugLevel.API);
                    }

                    UnityEditor.EditorPrefs.SetBool("apiLoggingEnabled", enableLogging);
                }
            }

            // All logging
            {
                bool isLoggingEnabled = UnityEditor.EditorPrefs.GetBool("allLoggingEnabled");
                bool enableLogging    = EditorGUILayout.ToggleLeft("All Logging Enabled", isLoggingEnabled);
                if (enableLogging != isLoggingEnabled)
                {
                    if (enableLogging)
                    {
                        VRC.Core.Logger.AddDebugLevel(DebugLevel.All);
                    }
                    else
                    {
                        VRC.Core.Logger.RemoveDebugLevel(DebugLevel.All);
                    }

                    UnityEditor.EditorPrefs.SetBool("allLoggingEnabled", enableLogging);
                }
            }
            EditorGUILayout.EndVertical();
        }
        else
        {
            if (UnityEditor.EditorPrefs.GetBool("apiLoggingEnabled"))
            {
                UnityEditor.EditorPrefs.SetBool("apiLoggingEnabled", false);
            }
            if (UnityEditor.EditorPrefs.GetBool("allLoggingEnabled"))
            {
                UnityEditor.EditorPrefs.SetBool("allLoggingEnabled", false);
            }
        }

        // Future proof upload
        {
            EditorGUILayout.Separator();
            EditorGUILayout.BeginVertical(boxGuiStyle);

            EditorGUILayout.LabelField("Publish", EditorStyles.boldLabel);
            bool futureProofPublish = UnityEditor.EditorPrefs.GetBool("futureProofPublish", DefaultFutureProofPublishEnabled);

            futureProofPublish = EditorGUILayout.ToggleLeft("Future Proof Publish", futureProofPublish);

            if (UnityEditor.EditorPrefs.GetBool("futureProofPublish", DefaultFutureProofPublishEnabled) != futureProofPublish)
            {
                UnityEditor.EditorPrefs.SetBool("futureProofPublish", futureProofPublish);
            }
            EditorGUILayout.LabelField("Client Version Date", clientVersionDate);
            EditorGUILayout.LabelField("SDK Version Date", sdkVersionDate);

            EditorGUILayout.EndVertical();
        }


        if (APIUser.CurrentUser != null)
        {
            EditorGUILayout.Separator();
            EditorGUILayout.BeginVertical(boxGuiStyle);

            // custom vrchat install location
            OnVRCInstallPathGUI();

            EditorGUILayout.EndVertical();
        }

        EditorGUILayout.EndScrollView();

        GUILayout.EndVertical();
        GUILayout.FlexibleSpace();
        GUILayout.EndHorizontal();
    }