예제 #1
0
        static void DrawAdditionalInfo()
        {
            GetSocialEditorUtils.BeginSetSmallIconSize();
            EditorGUILayout.LabelField(new GUIContent(" SDK Info", GetSocialEditorUtils.InfoIcon),
                                       EditorStyles.boldLabel);
            GetSocialEditorUtils.EndSetSmallIconSize();

            using (new EditorGUILayout.HorizontalScope(GUI.skin.box))
            {
                EditorGuiUtils.SelectableLabelField(
                    new GUIContent("SDK Version [?]", "GetSocial SDK Version"),
                    BuildConfig.UnitySdkVersion);
            }
        }
예제 #2
0
        static void DrawAndroidSigningSignatureHash()
        {
            string     label   = "Signing-certificate fingerprint [?]";
            GUIContent content = new GUIContent(label,
                                                "SHA-256 hash of the keystore you use to sign your application.");

            var hasError = GetSocialEditorUtils.KeyStoreUtilError != null;

            if (hasError)
            {
                EditorGUILayout.BeginHorizontal();
                EditorGUILayout.LabelField(label, GUILayout.Height(16), EditorGuiUtils.OneThirdWidth);
                if (GUILayout.Button("More info", EditorStyles.miniButton, EditorGuiUtils.OneThirdWidth))
                {
                    Application.OpenURL(string.Format("https://docs.getsocial.im/knowledge-base/android-signing-key-sha256/?utm_source={0}&utm_medium=unity-editor", BuildConfig.PublishTarget));
                }
                if (GUILayout.Button("Refresh", EditorStyles.miniButton, EditorGuiUtils.OneThirdWidth))
                {
                    AssetDatabase.ImportAsset(GetSocialSettings.GetPluginPath() + Path.DirectorySeparatorChar +
                                              "Editor" + Path.DirectorySeparatorChar +
                                              "GetSocialSettingsEditor.cs");
                }
                EditorGUILayout.EndHorizontal();
            }
            else
            {
                EditorGuiUtils.SelectableLabelField(content, GetSocialEditorUtils.SigningKeyHash);
            }

            using (new EditorGUILayout.HorizontalScope())
            {
                if (!GetSocialEditorUtils.UserDefinedKeystore())
                {
                    EditorGUILayout.HelpBox("You are using default Android keystore to sign your application. Are you sure this is what you want?",
                                            MessageType.Warning);
                }
                else if (GetSocialEditorUtils.KeyStoreUtilError != null)
                {
                    EditorGUILayout.HelpBox(GetSocialEditorUtils.KeyStoreUtilError,
                                            MessageType.Warning);
                }
            }
        }
 static void DrawAndroidSigningSignatureHash()
 {
     using (new EditorGUILayout.HorizontalScope())
     {
         string     label   = "Signing-certificate fingerprint [?]";
         GUIContent content = new GUIContent(label,
                                             "SHA-256 hash of the keystore you use to sign your application.");
         EditorGuiUtils.SelectableLabelField(content, GetSocialEditorUtils.SigningKeyHash);
     }
     if (GetSocialEditorUtils.KeyStoreUtilError != null)
     {
         EditorGUILayout.HelpBox(GetSocialEditorUtils.KeyStoreUtilError,
                                 MessageType.Error);
     }
     if (!GetSocialEditorUtils.UserDefinedKeystore())
     {
         EditorGUILayout.HelpBox("You are using default Android keystore to sign your application. Are you sure this is what you want?",
                                 MessageType.Warning);
     }
 }