static void OnVRCInstallPathGUI()
    {
        EditorGUILayout.LabelField("VRChat Client", EditorStyles.boldLabel);
        EditorGUILayout.LabelField("Installed Client Path: ", clientInstallPath);
        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("");
        if (GUILayout.Button("Edit"))
        {
            string initPath = "";
            if (!string.IsNullOrEmpty(clientInstallPath))
            {
                initPath = clientInstallPath;
            }

            clientInstallPath = EditorUtility.OpenFilePanel("Choose VRC Client Exe", initPath, "exe");
            SDKClientUtilities.SetVRCInstallPath(clientInstallPath);
            window.OnConfigurationChanged();
        }
        if (GUILayout.Button("Revert to Default"))
        {
            clientInstallPath = SDKClientUtilities.LoadRegistryVRCInstallPath();
            window.OnConfigurationChanged();
        }
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.Separator();
    }
Esempio n. 2
0
        static void OnCreatorStatusGUI()
        {
            EditorGUILayout.LabelField("Logged in as:", APIUser.CurrentUser.displayName);

            if (SDKClientUtilities.IsInternalSDK())
            {
                EditorGUILayout.LabelField("Developer Status: ", APIUser.CurrentUser.developerType.ToString());
            }

            EditorGUILayout.BeginHorizontal();

            EditorGUILayout.BeginVertical();
            EditorGUILayout.LabelField("World Creator Status: ", APIUser.CurrentUser.canPublishWorlds ? "Allowed to publish worlds" : "Not yet allowed to publish worlds");
            EditorGUILayout.LabelField("Avatar Creator Status: ", APIUser.CurrentUser.canPublishAvatars ? "Allowed to publish avatars" : "Not yet allowed to publish avatars");
            EditorGUILayout.EndVertical();

            if (!APIUser.CurrentUser.canPublishAllContent)
            {
                if (GUILayout.Button("More Info..."))
                {
                    VRC_SdkControlPanel.ShowContentPublishPermissionsDialog();
                }
            }


            EditorGUILayout.EndHorizontal();
        }
Esempio n. 3
0
        public static void Init()
        {
            if (isInitialized)
            {
                return;
            }

            // make sure the api url is set correctly before attempting to log in
            RefreshApiUrlSetting();

            if (!APIUser.IsLoggedInWithCredentials && ApiCredentials.Load())
            {
                APIUser.FetchCurrentUser((c) => AnalyticsSDK.LoggedInUserChanged(c.Model as APIUser), null);
            }

            clientInstallPath = SDKClientUtilities.GetSavedVRCInstallPath();
            if (string.IsNullOrEmpty(clientInstallPath))
            {
                clientInstallPath = SDKClientUtilities.LoadRegistryVRCInstallPath();
            }

            signingIn     = false;
            isInitialized = true;

            VRCContentManagerWindow.ClearContent();
        }
Esempio n. 4
0
        public static void RunScene(string vrcFilePath, string pluginFilePath)
        {
            string str          = WWW.EscapeURL(vrcFilePath).Replace("+", "%20");
            string text         = WWW.EscapeURL(pluginFilePath).Replace("+", "%20");
            string randomDigits = Tools.GetRandomDigits(10);
            string text2        = SDKClientUtilities.GetSavedVRCInstallPath();

            if (string.IsNullOrEmpty(text2) || !File.Exists(text2))
            {
                text2 = "vrchat://create?roomId=" + randomDigits + "&hidden=true&name=BuildAndRun&url=file:///" + str;
                if (!string.IsNullOrEmpty(text))
                {
                    text2 = text2 + "&pluginUrl=file:///" + text;
                }
            }
            string text3 = "--url=create?roomId=" + randomDigits + "&hidden=true&name=BuildAndRun&url=file:///" + str;

            if (!string.IsNullOrEmpty(text))
            {
                text3 = text3 + "&pluginUrl=file:///" + text;
            }
            ProcessStartInfo processStartInfo = new ProcessStartInfo(text2, text3);

            processStartInfo.WorkingDirectory = Path.GetDirectoryName(text2);
            for (int i = 0; i < numClientsToLaunch; i++)
            {
                Process.Start(processStartInfo);
            }
        }
        public static void Init()
        {
            if (!RemoteConfig.IsInitialized())
            {
                RemoteConfig.Init();
            }

            if (isInitialized)
            {
                return;
            }

            if (!APIUser.IsLoggedInWithCredentials && ApiCredentials.Load())
            {
                APIUser.Login(null, null);
            }

            clientInstallPath = SDKClientUtilities.GetSavedVRCInstallPath();
            if (string.IsNullOrEmpty(clientInstallPath))
            {
                clientInstallPath = SDKClientUtilities.LoadRegistryVRCInstallPath();
            }

            signingIn     = false;
            isInitialized = true;
        }
Esempio n. 6
0
        public static void Init()
        {
            if (!RemoteConfig.IsInitialized())
            {
                RemoteConfig.Init();
            }

            if (isInitialized)
            {
                return;
            }

            if (!APIUser.IsLoggedInWithCredentials && ApiCredentials.Load())
            {
                APIUser.Login((user) => AnalyticsSDK.LoggedInUserChanged(user), null);
            }

            clientInstallPath = SDKClientUtilities.GetSavedVRCInstallPath();
            if (string.IsNullOrEmpty(clientInstallPath))
            {
                clientInstallPath = SDKClientUtilities.LoadRegistryVRCInstallPath();
            }

            signingIn     = false;
            isInitialized = true;

            VRCContentManagerWindow.ClearContent();
        }
Esempio n. 7
0
    public static void InitAccount()
    {
        if (isInitialized)
        {
            return;
        }

        if (!APIUser.IsLoggedIn && ApiCredentials.Load())
        {
            APIUser.FetchCurrentUser((c) => AnalyticsSDK.LoggedInUserChanged(c.Model as APIUser), null);
        }

        clientInstallPath = SDKClientUtilities.GetSavedVRCInstallPath();
        if (string.IsNullOrEmpty(clientInstallPath))
        {
            clientInstallPath = SDKClientUtilities.LoadRegistryVRCInstallPath();
        }

        signingIn     = false;
        isInitialized = true;

        ClearContent();
    }