static SocialPlatfromInit() { if (FileStaticAPI.IsFolderExists("Extensions/UltimateMobile/")) { return; } if (FileStaticAPI.IsFolderExists("Extensions/AndroidNative/")) { return; } if (!SocialPlatfromSettingsEditor.IsInstalled) { EditorApplication.update += OnEditorLoaded; } else { if (!SocialPlatfromSettingsEditor.IsUpToDate) { EditorApplication.update += OnEditorLoaded; } } }
private void AboutGUI() { EditorGUILayout.HelpBox("About the Plugin", MessageType.None); SelectableLabelField(SdkVersion, AndroidNativeSettings.VERSION_NUMBER); if (FileStaticAPI.IsFolderExists("Facebook")) { SelectableLabelField(FBdkVersion, SocialPlatfromSettings.FB_SDK_VERSION_NUMBER); } SelectableLabelField(GPSdkVersion, AndroidNativeSettings.GOOGLE_PLAY_SDK_VERSION_NUMBER); SelectableLabelField(SupportEmail, "*****@*****.**"); }
public static void ThirdPartySettings(bool showTitle = true) { if (showTitle) { EditorGUILayout.Space(); EditorGUILayout.HelpBox("Third Party Settings", MessageType.None); } EditorGUILayout.LabelField("One Signal", EditorStyles.boldLabel); EditorGUI.indentLevel++; { EditorGUI.BeginChangeCheck(); IOSNativeSettings.Instance.OneSignalEnabled = ToggleFiled("Enable One Signal", IOSNativeSettings.Instance.OneSignalEnabled); if (EditorGUI.EndChangeCheck()) { if (IOSNativeSettings.Instance.OneSignalEnabled) { if (!(FileStaticAPI.IsFolderExists("Plugins/OneSignal") || !FileStaticAPI.IsFolderExists("OneSignal"))) { bool res = EditorUtility.DisplayDialog("One Signal not found", "IOS Native wasn't able to find One Signal libraries in your project. Would you like to download and install it?", "Download", "No Thanks"); if (res) { Application.OpenURL(IOSNativeSettings.Instance.OneSignalDocsLink); } IOSNativeSettings.Instance.OneSignalEnabled = false; } } } } EditorGUI.indentLevel--; EditorGUILayout.BeginHorizontal(); EditorGUILayout.Space(); if (GUILayout.Button("[?] Read More", GUILayout.Width(100.0f))) { Application.OpenURL(IOSNativeSettings.Instance.OneSignalDocsLink); } EditorGUILayout.EndHorizontal(); EditorGUILayout.LabelField("Soomla Configuration", EditorStyles.boldLabel); EditorGUI.indentLevel++; { EditorGUI.BeginChangeCheck(); bool prevSoomlaState = IOSNativeSettings.Instance.EnableSoomla; IOSNativeSettings.Instance.EnableSoomla = ToggleFiled("Enable GROW", IOSNativeSettings.Instance.EnableSoomla); if (EditorGUI.EndChangeCheck()) { UpdatePluginSettings(); } if (!prevSoomlaState && IOSNativeSettings.Instance.EnableSoomla) { bool res = EditorUtility.DisplayDialog("Soomla Grow", "Make sure you initialize SoomlaGrow when your games starts: \nISN_SoomlaGrow.Init();", "Documentation", "Got it"); if (res) { Application.OpenURL(IOSNativeSettings.Instance.SoomlaDocsLink); } } GUI.enabled = IOSNativeSettings.Instance.EnableSoomla; EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Game Key"); IOSNativeSettings.Instance.SoomlaGameKey = EditorGUILayout.TextField(IOSNativeSettings.Instance.SoomlaGameKey); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Env Key"); IOSNativeSettings.Instance.SoomlaEnvKey = EditorGUILayout.TextField(IOSNativeSettings.Instance.SoomlaEnvKey); EditorGUILayout.EndHorizontal(); GUI.enabled = true; } EditorGUI.indentLevel--; }
private void OtherSettings() { CameraAndGallery(); EditorGUILayout.Space(); EditorGUILayout.LabelField("Replay Kit", EditorStyles.boldLabel); EditorGUI.indentLevel++; { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Full screen video edit preview on iPad"); bool windowed = IOSNativeSettings.Instance.RPK_iPadViewType == 0; windowed = EditorGUILayout.Toggle(windowed); if (windowed) { IOSNativeSettings.Instance.RPK_iPadViewType = 0; } else { IOSNativeSettings.Instance.RPK_iPadViewType = 1; } EditorGUILayout.EndHorizontal(); } EditorGUI.indentLevel--; EditorGUILayout.Space(); EditorGUILayout.LabelField("One Signal", EditorStyles.boldLabel); EditorGUI.indentLevel++; { EditorGUI.BeginChangeCheck(); IOSNativeSettings.Instance.OneSignalEnabled = ToggleFiled("Enable One Signal", IOSNativeSettings.Instance.OneSignalEnabled); if (EditorGUI.EndChangeCheck()) { if (IOSNativeSettings.Instance.OneSignalEnabled) { if (!FileStaticAPI.IsFolderExists("Plugins/OneSignal")) { bool res = EditorUtility.DisplayDialog("One Signal not found", "IOS Native wasn't able to find One Signal libraries in your project. Would you like to download and install it?", "Download", "No Thanks"); if (res) { Application.OpenURL(IOSNativeSettings.Instance.OneSignalDocsLink); } IOSNativeSettings.Instance.OneSignalEnabled = false; } } } } EditorGUI.indentLevel--; EditorGUILayout.BeginHorizontal(); EditorGUILayout.Space(); if (GUILayout.Button("[?] Read More", GUILayout.Width(100.0f))) { Application.OpenURL(IOSNativeSettings.Instance.OneSignalDocsLink); } EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); EditorGUILayout.LabelField("Soomla Configuration", EditorStyles.boldLabel); EditorGUI.indentLevel++; { EditorGUI.BeginChangeCheck(); bool prevSoomlaState = IOSNativeSettings.Instance.EnableSoomla; IOSNativeSettings.Instance.EnableSoomla = ToggleFiled("Enable GROW", IOSNativeSettings.Instance.EnableSoomla); if (EditorGUI.EndChangeCheck()) { UpdatePluginSettings(); } if (!prevSoomlaState && IOSNativeSettings.Instance.EnableSoomla) { bool res = EditorUtility.DisplayDialog("Soomla Grow", "Make sure you initialize SoomlaGrow when your games starts: \nISN_SoomlaGrow.Init();", "Documentation", "Got it"); if (res) { Application.OpenURL(IOSNativeSettings.Instance.SoomlaDocsLink); } } GUI.enabled = IOSNativeSettings.Instance.EnableSoomla; EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Game Key"); IOSNativeSettings.Instance.SoomlaGameKey = EditorGUILayout.TextField(IOSNativeSettings.Instance.SoomlaGameKey); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Env Key"); IOSNativeSettings.Instance.SoomlaEnvKey = EditorGUILayout.TextField(IOSNativeSettings.Instance.SoomlaEnvKey); EditorGUILayout.EndHorizontal(); GUI.enabled = true; } EditorGUI.indentLevel--; }
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(); } }