void DrawAndroidSettings() { var androidSettingsText = " Android Settings"; if (!ShowAndroidSettings && !GetSocialSettings.IsAndroidEnabled) { androidSettingsText += PlatformDisabledLabel; } var androidSettingsLabel = EditorGuiUtils.GetBoldLabel(androidSettingsText, "", GetSocialEditorUtils.AndroidIcon); GetSocialEditorUtils.BeginSetSmallIconSize(); ShowAndroidSettings = EditorGUILayout.Foldout(ShowAndroidSettings, androidSettingsLabel); GetSocialEditorUtils.EndSetSmallIconSize(); if (ShowAndroidSettings) { EditorGUILayout.BeginVertical(GUI.skin.box); { DrawDashboardSettingToogle("Platform status", GetSocialSettings.IsAndroidEnabled ? "✔️ Enabled [?]" : "✘ Disabled [?]"); DrawDashboardSettingToogle("Push notifications status", GetSocialSettings.IsAndroidPushEnabled ? "✔️ Enabled [?]" : "✘ Disabled [?]"); if (Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.OSXEditor) { DrawAndroidSigningSignatureHash(); } } EditorGUILayout.EndVertical(); } }
void DrawIosSettings() { var iosSettingsText = " iOS Settings"; if (!ShowIosSettings && !GetSocialSettings.IsIosEnabled) { iosSettingsText += PlatformDisabledLabel; } var iosSettingsLabel = EditorGuiUtils.GetBoldLabel(iosSettingsText, "", GetSocialEditorUtils.IOSIcon); GetSocialEditorUtils.BeginSetSmallIconSize(); ShowIosSettings = EditorGUILayout.Foldout(ShowIosSettings, iosSettingsLabel); GetSocialEditorUtils.EndSetSmallIconSize(); if (ShowIosSettings) { EditorGUILayout.BeginVertical(GUI.skin.box); { DrawiOSFrameworkStatusSettings(); DrawDashboardSettingToogle("Platform status", GetSocialSettings.IsIosEnabled ? "✔️ Enabled [?]" : "✘ Disabled [?]"); DrawDashboardSettingToogle("Push notifications status", GetSocialSettings.IsIosPushEnabled ? "✔️ Enabled [?]" : "✘ Disabled [?]"); if (GetSocialSettings.IsIosPushEnabled) { DrawDashboardSettingToogle("Push notifications environment", " " + GetSocialSettings.IosPushEnvironment.Capitalize()); } } EditorGUILayout.EndVertical(); } }
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); } }
void DrawGeneralSettings() { GetSocialEditorUtils.BeginSetSmallIconSize(); EditorGUILayout.LabelField(new GUIContent(" General Settings", GetSocialEditorUtils.GetSocialIcon), EditorStyles.boldLabel); GetSocialEditorUtils.EndSetSmallIconSize(); EditorGUILayout.BeginVertical(GUI.skin.box); { DrawAppIdSettings(); DrawCommonSettings(); GUILayout.Space(15); DrawPushNotificationSettings(); GUILayout.Space(15); DrawUiSettings(); } EditorGUILayout.EndVertical(); }
void DrawIosSettings() { var iosSettingsText = " iOS Settings"; if (!ShowIosSettings && !GetSocialSettings.IsIosEnabled) { iosSettingsText += PlatformDisabledLabel; } var iosSettingsLabel = EditorGuiUtils.GetBoldLabel(iosSettingsText, "", GetSocialEditorUtils.IOSIcon); GetSocialEditorUtils.BeginSetSmallIconSize(); ShowIosSettings = EditorGUILayout.Foldout(ShowIosSettings, iosSettingsLabel); GetSocialEditorUtils.EndSetSmallIconSize(); if (ShowIosSettings) { EditorGUILayout.BeginVertical(GUI.skin.box); { DrawDashboardSettingToogle("Platform status", GetSocialSettings.IsIosEnabled ? "✔️ Enabled [?]" : "✘ Disabled [?]"); DrawDashboardSettingToogle("Push notifications status", GetSocialSettings.IsIosPushEnabled ? "✔️ Enabled [?]" : "✘ Disabled [?]"); if (GetSocialSettings.IsIosPushEnabled) { #if UNITY_2018_1_OR_NEWER var richNotificationsEnabled = new GUIContent("Enable Rich Notifications [?]", "If it is enabled, notifications with images/videos can be displayed."); var enableRichNotifications = EditorGUILayout.ToggleLeft(richNotificationsEnabled, GetSocialSettings.IsRichPushNotificationsEnabled); SetRichNotificationsEnabled(enableRichNotifications); // extension bundle id, only if UNITY_2018_1_OR_NEWER EditorGUILayout.BeginHorizontal(); var extensionBundleIdLabel = new GUIContent("Notification Extension Bundle Id [?]", "Bundle id of the extension."); EditorGUILayout.LabelField(extensionBundleIdLabel, EditorGuiUtils.OneThirdWidth); var extensionBundleId = EditorGUILayout.TextField(GetSocialSettings.ExtensionBundleId, EditorGuiUtils.OneThirdWidth); if (extensionBundleId.Length == 0) { extensionBundleId = PlayerSettings.applicationIdentifier + ".getsocialextension"; } SetExtensionBundleId(extensionBundleId); if (GUILayout.Button("More info", EditorStyles.miniButton, EditorGuiUtils.OneThirdWidth)) { Application.OpenURL(string.Format("https://docs.getsocial.im/guides/notifications/setup-push-notifications/unity/#receiving-rich-push-notifications-and-badges-ios-only", BuildConfig.PublishTarget)); } EditorGUILayout.EndHorizontal(); // extension provisioning profile EditorGUILayout.BeginHorizontal(); var extensionProvisioningProfileLabel = new GUIContent("Notification Extension Provisioning Profile [?]", "Name of the provision profile used for signing the extension, or leave it empty if you use automatic signing"); EditorGUILayout.LabelField(extensionProvisioningProfileLabel, EditorGuiUtils.OneThirdWidth); var extensionProvisioningProfile = EditorGUILayout.TextField(GetSocialSettings.ExtensionProvisioningProfile, EditorGuiUtils.OneThirdWidth); SetExtensionProvisioningProfile(extensionProvisioningProfile); if (GUILayout.Button("More info", EditorStyles.miniButton, EditorGuiUtils.OneThirdWidth)) { Application.OpenURL(string.Format("https://docs.getsocial.im/guides/notifications/setup-push-notifications/unity/#receiving-rich-push-notifications-and-badges-ios-only", BuildConfig.PublishTarget)); } EditorGUILayout.EndHorizontal(); #endif } } EditorGUILayout.EndVertical(); } }