Exemplo n.º 1
0
        private static void InitGoogleService()
        {
            UserCredential credential;
            string         credentialPath = EditorUtility.OpenFilePanel("Select your API credential",
                                                                        Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "json");

            if (credentialPath == "")
            {
                Application.OpenURL("https://developers.google.com/drive/api/v3/quickstart/dotnet");
            }

            string credPath = Path.GetDirectoryName(credentialPath) + "\\token.json";

            using (var stream = new FileStream(credentialPath, FileMode.Open, FileAccess.Read))
            {
                credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
                    stream,
                    Scopes,
                    "user",
                    CancellationToken.None,
                    new FileDataStore(credPath, true)).Result;

                Debug.Log("Credential file saved to: " + credPath);
            }

            // Create Drive API service.
            driveService = new DriveService(new BaseClientService.Initializer()
            {
                HttpClientInitializer = credential,
                ApplicationName       = ApplicationName,
            });
        }
        private void WhatNextSlide()
        {
            TutorialGUI.Paragraph(
                "Now you can freely explore the example, it should be " +
                "all configured to talk with the cloud as the game " +
                "you've just created."
                );

            TutorialGUI.Paragraph(
                "- try registering players and logging in"
                );

            TutorialGUI.Paragraph(
                "- open the database and view the registered players"
                );

            TutorialGUI.Paragraph(
                "- this example was created from the <i>Email " +
                "authentication</i> template. Go explore its documentation " +
                "and learn more at:"
                );

            TutorialGUI.Form(() => {
                string url = "https://unisave.cloud/docs/email-authentication";
                if (GUILayout.Button(url))
                {
                    Application.OpenURL(url);
                }
            });
        }
Exemplo n.º 3
0
                     public static bool A(string label, string url, int width = -1)
                     {
                         bool ㄸ = width < 0 ? Button(label) : Button(label, Width(width));

                         if (ㄸ)
                         {
                             App.OpenURL(url); return(true);
                         }
                         else
                         {
                             return(false);
                         }
                     }
Exemplo n.º 4
0
        static void RiderPreferencesItem()
        {
            EditorGUILayout.BeginVertical();

            var url = "https://github.com/JetBrains/Unity3dRider";

            if (GUILayout.Button(url))
            {
                Application.OpenURL(url);
            }

            EditorGUI.BeginChangeCheck();

            var enabledMsg = @"Enable Unity3dRider.";

            Enabled =
                EditorGUILayout.Toggle(
                    new GUIContent("Enable Unity3dRider",
                                   enabledMsg), Enabled);
            EditorGUILayout.HelpBox(enabledMsg, MessageType.None);

            var help = @"For now target 4.5 is strongly recommended.
 - Without 4.5:
    - Rider will fail to resolve System.Linq on Mac/Linux
    - Rider will fail to resolve Firebase Analytics.
 - With 4.5 Rider will show ambiguous references in UniRx.
All those problems will go away after Unity upgrades to mono4.";

            TargetFrameworkVersion45 =
                EditorGUILayout.Toggle(
                    new GUIContent("TargetFrameworkVersion 4.5",
                                   help), TargetFrameworkVersion45);
            EditorGUILayout.HelpBox(help, MessageType.None);

            EditorGUI.EndChangeCheck();

            EditorGUI.BeginChangeCheck();

            var loggingMsg =
                @"Enable logging. If you are about to report an issue, please enable logging and attach Unity console output to the issue.";

            EnableLogging =
                EditorGUILayout.Toggle(
                    new GUIContent("Enable Logging",
                                   loggingMsg), EnableLogging);
            EditorGUILayout.HelpBox(loggingMsg, MessageType.None);

            EditorGUI.EndChangeCheck();
        }
Exemplo n.º 5
0
        static void RiderPreferencesItem()
        {
            EditorGUILayout.BeginVertical();

            var url = "https://github.com/JetBrains/resharper-unity";

            if (GUILayout.Button(url))
            {
                Application.OpenURL(url);
            }

            EditorGUI.BeginChangeCheck();

            var help = @"For now target 4.5 is strongly recommended.
 - Without 4.5:
    - Rider will fail to resolve System.Linq on Mac/Linux
    - Rider will fail to resolve Firebase Analytics.
 - With 4.5 Rider will show ambiguous references in UniRx.
All those problems will go away after Unity upgrades to mono4.";

            TargetFrameworkVersion45 =
                EditorGUILayout.Toggle(
                    new GUIContent("TargetFrameworkVersion 4.5",
                                   help), TargetFrameworkVersion45);
            EditorGUILayout.HelpBox(help, MessageType.None);

            EditorGUI.EndChangeCheck();

            EditorGUI.BeginChangeCheck();

            var loggingMsg =
                @"Sets the amount of Rider Debug output. If you are about to report an issue, please select Verbose logging level and attach Unity console output to the issue.";

            SelectedLoggingLevel = (LoggingLevel)EditorGUILayout.EnumPopup(new GUIContent("Logging Level", loggingMsg), SelectedLoggingLevel);
            EditorGUILayout.HelpBox(loggingMsg, MessageType.None);

            EditorGUI.EndChangeCheck();

/*      if (GUILayout.Button("reset RiderInitializedOnce = false"))
 *    {
 *      RiderInitializedOnce = false;
 *    }*/

            EditorGUILayout.EndVertical();
        }
        private void RegistrationSlide()
        {
            TutorialGUI.Paragraph(
                "Register yourself at the Unisave web to be able to access " +
                "the web app."
                );

            TutorialGUI.Form(() => {
                if (GUILayout.Button("Open https://unisave.cloud/"))
                {
                    Application.OpenURL("https://unisave.cloud/");
                }
            });

            TutorialGUI.Paragraph(
                "Then create a new game in the web app."
                );
        }
Exemplo n.º 7
0
        private static void LinkButton(string caption, string url)
        {
            var style = GUI.skin.label;

            style.richText = true;
            caption        = string.Format("<color=#0000FF>{0}</color>", caption);

            bool bClicked = GUILayout.Button(caption, style);

            var rect = GUILayoutUtility.GetLastRect();

            rect.width = style.CalcSize(new GUIContent(caption)).x;
            EditorGUIUtility.AddCursorRect(rect, MouseCursor.Link);

            if (bClicked)
            {
                Application.OpenURL(url);
            }
        }
Exemplo n.º 8
0
 private void OpenChangelog()
 {
     Application.OpenURL("http://assetstore.phbarralis.com/sge/changelog.html");
 }
Exemplo n.º 9
0
 private void OpenManual()
 {
     Application.OpenURL("http://assetstore.phbarralis.com/sge/features.html");
 }
Exemplo n.º 10
0
 private void OpenDiscordHelp()
 {
     Application.OpenURL("https://discord.gg/ksURBah");
 }
Exemplo n.º 11
0
 private void OpenEmailHelp()
 {
     Application.OpenURL("mailto:[email protected]");
 }
Exemplo n.º 12
0
 private void OpenSetup()
 {
     Application.OpenURL("http://assetstore.phbarralis.com/urpdebugviews/getting_started.html#setup");
 }