Esempio n. 1
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();
        }
        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. 3
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);
            }
        }
Esempio n. 4
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. 5
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();
    }