Пример #1
0
    private void LoadExampleSettings()
    {
        AndroidNativeSettings.Instance.base64EncodedPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsV676BTvO5djSDdUwotbLCIPtGZ5OVCbIn402RXuEpDwuHZMIOy5E6DQjUlQPKCiB7A1Vx+ePQI50Gk8NO1zuPRBgCgvW/oTTf863KkF34QLZD+Ii8fc6VE0UKp3GfApnLmq2qtr1fwDmRCteBUET1h0EcRn3/6R/BA5DMmF1aTv8yUY5LQETWqEPIjGdyNaAhmnWf2sTliYLANiR51WXsfbDdCNT4Ux3gQo/XJynGadfwRS7A9N9e5SgvMEFUR6EwnANOF9QXgE2d0HEitpS56D3uHH/2LwICrTWAmbLX3qPYlQ3Ncf1SRyjqiKae2wW8QUnDFU5BSozwGW6tcQvQIDAQAB";
        AndroidNativeSettings.Instance.InAppProducts          = new List <string>();
        AndroidNativeSettings.Instance.InAppProducts.Add("coins_bonus");
        AndroidNativeSettings.Instance.InAppProducts.Add("small_coins_bag");
        AndroidNativeSettings.Instance.GCM_SenderId = "216817929098";

        SocialPlatfromSettingsEditor.LoadExampleSettings();
    }
Пример #2
0
    private void Actions()
    {
        EditorGUILayout.Space();
        AndroidNativeSettings.Instance.ShowActions = EditorGUILayout.Foldout(AndroidNativeSettings.Instance.ShowActions, "More Actions");
        if (AndroidNativeSettings.Instance.ShowActions)
        {
            if (!FileStaticAPI.IsFolderExists("Facebook"))
            {
                GUI.enabled = false;
            }

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.Space();

            if (GUILayout.Button("Remove Facebook SDK", GUILayout.Width(160)))
            {
                bool result = EditorUtility.DisplayDialog(
                    "Removing Facebook SDK",
                    "Warning action can not be undone without reimporting the plugin",
                    "Remove",
                    "Cansel");

                if (result)
                {
                    FileStaticAPI.DeleteFolder(PluginsInstalationUtil.ANDROID_DESTANATION_PATH + "facebook");
                    FileStaticAPI.DeleteFolder("Facebook");
                    FileStaticAPI.DeleteFolder("Extensions/GooglePlayCommon/Social/Facebook");
                    FileStaticAPI.DeleteFile("Extensions/AndroidNative/xExample/Scripts/Social/FacebookAndroidUseExample.cs");
                    FileStaticAPI.DeleteFile("Extensions/AndroidNative/xExample/Scripts/Social/FacebookAnalyticsExample.cs");
                }
            }

            GUI.enabled = true;
            EditorGUILayout.EndHorizontal();
            EditorGUILayout.Space();


            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.Space();
            if (GUILayout.Button("Reset Settings", GUILayout.Width(160)))
            {
                SocialPlatfromSettingsEditor.ResetSettings();

                FileStaticAPI.DeleteFile("Extensions/AndroidNative/Resources/AndroidNativeSettings.asset");
                AndroidNativeSettings.Instance.ShowActions = true;
                Selection.activeObject = AndroidNativeSettings.Instance;

                return;
            }

            if (GUILayout.Button("Load Example Settings", GUILayout.Width(160)))
            {
                SocialPlatfromSettingsEditor.LoadExampleSettings();
                FileStaticAPI.DeleteFile("Extensions/AndroidNative/Resources/AndroidNativeSettings.asset");
                FileStaticAPI.CopyFile("Extensions/AndroidNative/Resources/AndroidNativeSettings_example.asset", "Extensions/AndroidNative/Resources/AndroidNativeSettings.asset");
            }


            EditorGUILayout.EndHorizontal();
        }
    }