public static void Library() { SA_EditorGUILayout.Header("LIBRARIES"); EditorGUILayout.BeginHorizontal(); EditorGUI.indentLevel++; ISD_Settings.Instance.IsDefLibrariesOpen = EditorGUILayout.Foldout(ISD_Settings.Instance.IsDefLibrariesOpen, "Default Unity Libraries (2 Enabled)"); EditorGUI.indentLevel--; EditorGUILayout.EndHorizontal(); if (ISD_Settings.Instance.IsDefLibrariesOpen) { EditorGUILayout.BeginVertical(GUI.skin.box); SA_EditorGUILayout.SelectableLabel("libiPhone-lib.a", ""); SA_EditorGUILayout.SelectableLabel("libiconv.2.dylib", ""); EditorGUILayout.EndVertical(); EditorGUILayout.Space(); } EditorGUILayout.Space(); SA_EditorGUILayout.HorizontalLine(); EditorGUILayout.LabelField("Custom Libraries", EditorStyles.boldLabel); SA_EditorGUILayout.ReorderablList(ISD_Settings.Instance.Libraries, (ISD_Library lib) => { if (lib.IsOptional) { return(lib.Name + " (Optional)"); } else { return(lib.Name); } }, (ISD_Library lib) => { lib.IsOptional = SA_EditorGUILayout.ToggleFiled("Optional", lib.IsOptional, SA_StyledToggle.ToggleType.YesNo); } ); EditorGUILayout.BeginHorizontal(); EditorStyles.popup.fixedHeight = 20; NewLibraryIndex = EditorGUILayout.Popup(NewLibraryIndex, ISD_LibHandler.BaseLibrariesArray()); if (GUILayout.Button("Add Library", GUILayout.Height(20))) { ISD_iOSLibrary type = (ISD_iOSLibrary)ISD_LibHandler.enumValueOf(ISD_LibHandler.BaseLibrariesArray()[NewLibraryIndex]); NewLibraryIndex = 0; ISD_API.AddLibrary(type); } EditorGUILayout.EndHorizontal(); SA_EditorGUILayout.HorizontalLine(); }
public static void DrawRequirementsUI(ISN_XcodeRequirements xcodeRequirements) { if (xcodeRequirements.Frameworks.Count > 0) { using (new SA_H2WindowBlockWithSpace(new GUIContent("FRAMEWORKS"))) { foreach (var freamwork in xcodeRequirements.Frameworks) { SA_EditorGUILayout.SelectableLabel(new GUIContent(freamwork.Type.ToString() + ".framework", ISD_Skin.GetIcon("frameworks.png"))); } } } if (xcodeRequirements.Libraries.Count > 0) { using (new SA_H2WindowBlockWithSpace(new GUIContent("LIBRARIES"))) { foreach (var freamwork in xcodeRequirements.Libraries) { SA_EditorGUILayout.SelectableLabel(new GUIContent(freamwork.Type.ToString() + ".framework", ISD_Skin.GetIcon("frameworks.png"))); } } } if (xcodeRequirements.Capabilities.Count > 0) { using (new SA_H2WindowBlockWithSpace(new GUIContent("CAPABILITIES"))) { foreach (var capability in xcodeRequirements.Capabilities) { SA_EditorGUILayout.SelectableLabel(new GUIContent(capability + " Capability", ISD_Skin.GetIcon("capability.png"))); } } } if (xcodeRequirements.PlistKeys.Count > 0) { using (new SA_H2WindowBlockWithSpace(new GUIContent("PLIST KEYS"))) { foreach (var key in xcodeRequirements.PlistKeys) { SA_EditorGUILayout.SelectableLabel(new GUIContent(key.Name, ISD_Skin.GetIcon("plistVariables.png"))); } } } if (xcodeRequirements.Properties.Count > 0) { using (new SA_H2WindowBlockWithSpace(new GUIContent("BUILD PROPERTIES"))) { foreach (var property in xcodeRequirements.Properties) { SA_EditorGUILayout.SelectableLabel(new GUIContent(property.Name + " | " + property.Value, ISD_Skin.GetIcon("buildSettings.png"))); } } } }
public static void AboutGUI() { GUI.enabled = true; EditorGUILayout.HelpBox("About the Plugin", MessageType.None); EditorGUILayout.Space(); SA_EditorGUILayout.SelectableLabel(SdkVersion, ISD_Settings.VERSION_NUMBER); SA_CompanyGUILayout.SupportMail(); SA_CompanyGUILayout.DrawLogo(); }
private void DefineSymbols() { using (new SA_H2WindowBlockWithSpace(new GUIContent("SCRIPTING DEFINE SYMBOLS"))) { var defines = SA_EditorDefines.GetScriptingDefines(); if (defines.Length > 0) { foreach (var define in defines) { var icon = UM_Skin.GetDefaultIcon("hash_tag_icon.png"); SA_EditorGUILayout.SelectableLabel(new GUIContent(define, icon)); } } else { EditorGUILayout.HelpBox("No additional scripting defines required.", MessageType.Info); } } }
protected override void OnServiceUI() { using (new SA_WindowBlockWithSpace(new GUIContent("Configuration"))) { string setResourceName = "Update Game Resource"; if (AN_GoolgePlayRersources.GamesIds == null) { EditorGUILayout.HelpBox("Before you start using Google Play API with the plugin" + "You must first configure your game in the Google Play Developer Console, " + "and then define google play resources using the plugin.", MessageType.Warning); using (new SA_GuiBeginHorizontal()) { GUILayout.FlexibleSpace(); bool click = m_configureYourGameLink.DrawWithCalcSize(); if (click) { Application.OpenURL("https://unionassets.com/android-native-pro/getting-started-670"); } } setResourceName = "Set Game Resource"; } else { string applicationIdentifier = PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.Android); if (!applicationIdentifier.Equals(AN_GoolgePlayRersources.GamesIds.PackageName)) { EditorGUILayout.HelpBox("Player Settings Package Name does not match with " + "Android Games Package Name \n" + "unity: " + applicationIdentifier + "\n" + "games-ids.xml: " + AN_GoolgePlayRersources.GamesIds.PackageName, MessageType.Warning); } using (new SA_GuiBeginVertical(EditorStyles.helpBox)) { SA_EditorGUILayout.SelectableLabel("App Id", AN_GoolgePlayRersources.GamesIds.AppId); SA_EditorGUILayout.SelectableLabel("Package Name", AN_GoolgePlayRersources.GamesIds.PackageName); m_achievmentsShown = EditorGUILayout.Foldout(m_achievmentsShown, "Achievments"); if (m_achievmentsShown) { if (AN_GoolgePlayRersources.GamesIds.Achievements.Count > 0) { AN_GoolgePlayRersources.GamesIds.Achievements.ForEach(pair => { SA_EditorGUILayout.SelectableLabel(pair.Key, pair.Value); }); } else { EditorGUILayout.LabelField("There are no achievments in games-ids.xml"); } } m_leaderboardsShown = EditorGUILayout.Foldout(m_leaderboardsShown, "Leaderboards"); if (m_leaderboardsShown) { if (AN_GoolgePlayRersources.GamesIds.Leaderboards.Count > 0) { AN_GoolgePlayRersources.GamesIds.Leaderboards.ForEach(pair => { SA_EditorGUILayout.SelectableLabel(pair.Key, pair.Value); }); } else { EditorGUILayout.LabelField("There are no leaderboards in games-ids.xml"); } } } } using (new SA_GuiBeginHorizontal()) { GUILayout.FlexibleSpace(); m_setResource.Content.text = setResourceName; bool click = m_setResource.DrawWithCalcSize(); if (click) { AN_GoolgePlayRersourcesWindow.ShowModal(); } } } using (new SA_WindowBlockWithSpace(new GUIContent("Google Mobile Services APIs"))) { EditorGUILayout.HelpBox("In order to access Google Play games services functionality, " + "your game needs to provide the signed-in player’s account. If the player is not authenticated, " + "your game may encounter errors when making calls to the Google Play games services APIs.", MessageType.Info); using (new SA_GuiBeginHorizontal()) { EditorGUILayout.LabelField(SingInLabelContent); using (new SA_GuiEnable(false)) { SA_EditorGUILayout.ToggleFiled(new GUIContent(), true, SA_StyledToggle.ToggleType.EnabledDisabled); } } AN_Settings.Instance.GooglePlayGamesAPI = SA_EditorGUILayout.ToggleFiled(GamesLabelContent, AN_Settings.Instance.GooglePlayGamesAPI, SA_StyledToggle.ToggleType.EnabledDisabled); } }
public static void DrawRequirementsUI(AN_AndroidBuildRequirements buildRequirements) { if (buildRequirements.Activities.Count > 0) { using (new SA_H2WindowBlockWithSpace(new GUIContent("ACTIVITIES"))) { foreach (var activity in buildRequirements.Activities) { string name = SA_PathUtil.GetExtension(activity.Name); name = name.Substring(1, name.Length - 1); var icon = AN_Skin.GetIcon("requirements_activity.png"); SA_EditorGUILayout.SelectableLabel(new GUIContent("activity: " + name, icon)); } } } if (buildRequirements.ApplicationProperties.Count > 0) { using (new SA_H2WindowBlockWithSpace(new GUIContent("APP PROPERTIES"))) { foreach (var property in buildRequirements.ApplicationProperties) { var icon = AN_Skin.GetIcon("requirements_activity.png"); string name = SA_PathUtil.GetExtension(property.Name); name = name.Substring(1, name.Length - 1); SA_EditorGUILayout.SelectableLabel(new GUIContent(property.Tag + ": " + name, icon)); } } } if (buildRequirements.ManifestProperties.Count > 0) { using (new SA_H2WindowBlockWithSpace(new GUIContent("MANIFEST PROPERTIES"))) { foreach (var property in buildRequirements.ManifestProperties) { var icon = AN_Skin.GetIcon("requirements_activity.png"); string info = string.Empty; foreach (var pair in property.Values) { info += " " + pair.Key + " : " + pair.Value; } SA_EditorGUILayout.SelectableLabel(new GUIContent(property.Tag + info, icon)); } } } if (buildRequirements.Permissions.Count > 0) { using (new SA_H2WindowBlockWithSpace(new GUIContent("PERMISSIONS"))) { foreach (var permission in buildRequirements.Permissions) { var icon = AN_Skin.GetIcon("requirements_permission.png"); SA_EditorGUILayout.SelectableLabel(new GUIContent(permission.GetFullName(), icon)); } } } if (buildRequirements.BinaryDependencies.Count > 0) { using (new SA_H2WindowBlockWithSpace(new GUIContent("BINARY DEPENDENCIES"))) { foreach (var dependency in buildRequirements.BinaryDependencies) { var icon = AN_Skin.GetIcon("requirements_lib.png"); SA_EditorGUILayout.SelectableLabel(new GUIContent(dependency.GetRemoteRepositoryName(), icon)); } } } }
public void Frameworks() { Texture2D framework_icon = SA_EditorAssets.GetTextureAtPath(ISD_Skin.ICONS_PATH + "frameworks.png"); using (new SA_WindowBlockWithIndent(new GUIContent("Frameworks", framework_icon))) { IsDefFrameworksOpen = EditorGUILayout.Foldout(IsDefFrameworksOpen, "Show Default Unity Frameworks (17 Enabled)"); if (IsDefFrameworksOpen) { int indentLevel = EditorGUI.indentLevel; EditorGUI.indentLevel = 0; using (new SA_GuiBeginHorizontal()) { GUILayout.Space(30); using (new SA_GuiBeginVertical(GUI.skin.box)) { foreach (ISD_Framework framework in ISD_FrameworkHandler.DefaultFrameworks) { SA_EditorGUILayout.SelectableLabel(framework.Type.ToString() + ".framework", ""); } } } EditorGUI.indentLevel = indentLevel; EditorGUILayout.Space(); } IsDefLibrariesOpen = EditorGUILayout.Foldout(IsDefLibrariesOpen, "Default Unity Libraries (2 Enabled)"); if (IsDefLibrariesOpen) { int indentLevel = EditorGUI.indentLevel; EditorGUI.indentLevel = 0; using (new SA_GuiBeginHorizontal()) { GUILayout.Space(30); using (new SA_GuiBeginVertical(GUI.skin.box)) { SA_EditorGUILayout.SelectableLabel("libiPhone-lib.a", ""); SA_EditorGUILayout.SelectableLabel("libiconv.2.dylib", ""); } } EditorGUI.indentLevel = indentLevel; EditorGUILayout.Space(); } //Frameworks List SA_EditorGUILayout.ReorderablList(ISD_Settings.Instance.Frameworks, (ISD_Framework framework) => { if (framework.IsOptional && framework.IsEmbeded) { return(framework.Name + " (Optional & Embeded)"); } else if (framework.IsOptional) { return(framework.Name + " (Optional)"); } else if (framework.IsEmbeded) { return(framework.Name + " (Embeded)"); } else { return(framework.Name); } }, (ISD_Framework framework) => { framework.IsOptional = SA_EditorGUILayout.ToggleFiled("Optional", framework.IsOptional, SA_StyledToggle.ToggleType.YesNo); framework.IsEmbeded = SA_EditorGUILayout.ToggleFiled("Embeded", framework.IsEmbeded, SA_StyledToggle.ToggleType.YesNo); } ); //Libraries List SA_EditorGUILayout.ReorderablList(ISD_Settings.Instance.Libraries, (ISD_Library lib) => { if (lib.IsOptional) { return(lib.Name + " (Optional)"); } else { return(lib.Name); } }, (ISD_Library lib) => { lib.IsOptional = SA_EditorGUILayout.ToggleFiled("Optional", lib.IsOptional, SA_StyledToggle.ToggleType.YesNo); } ); //Add New Framework EditorGUILayout.BeginHorizontal(); NewBaseFrameworkIndex = EditorGUILayout.Popup(NewBaseFrameworkIndex, ISD_FrameworkHandler.BaseFrameworksArray()); if (GUILayout.Button("Add Framework", EditorStyles.miniButton, GUILayout.Width(100))) { var type = ISD_FrameworkHandler.BaseFrameworksArray()[NewBaseFrameworkIndex]; NewBaseFrameworkIndex = 0; ISD_Framework f = new ISD_Framework(type); ISD_API.AddFramework(f); } EditorGUILayout.EndHorizontal(); //Add New Library EditorGUILayout.BeginHorizontal(); NewLibraryIndex = EditorGUILayout.Popup(NewLibraryIndex, ISD_LibHandler.BaseLibrariesArray()); if (GUILayout.Button("Add Library", EditorStyles.miniButton, GUILayout.Width(100))) { ISD_iOSLibrary type = (ISD_iOSLibrary)ISD_LibHandler.enumValueOf(ISD_LibHandler.BaseLibrariesArray()[NewLibraryIndex]); NewLibraryIndex = 0; ISD_API.AddLibrary(type); } EditorGUILayout.EndHorizontal(); } }
public static void Frameworks() { SA_EditorGUILayout.Header("FRAMEWORKS"); EditorGUILayout.BeginHorizontal(); EditorGUI.indentLevel++; ISD_Settings.Instance.IsDefFrameworksOpen = EditorGUILayout.Foldout(ISD_Settings.Instance.IsDefFrameworksOpen, "Default Unity Frameworks (17 Enabled)"); EditorGUI.indentLevel--; EditorGUILayout.EndHorizontal(); if (ISD_Settings.Instance.IsDefFrameworksOpen) { EditorGUILayout.BeginVertical(GUI.skin.box); foreach (ISD_Framework framework in ISD_FrameworkHandler.DefaultFrameworks) { SA_EditorGUILayout.SelectableLabel(framework.Type.ToString() + ".framework", ""); } EditorGUILayout.EndVertical(); EditorGUILayout.Space(); } EditorGUILayout.Space(); SA_EditorGUILayout.HorizontalLine(); EditorGUILayout.LabelField("Custom IOS Frameworks", EditorStyles.boldLabel); SA_EditorGUILayout.ReorderablList(ISD_Settings.Instance.Frameworks, (ISD_Framework framework) => { if (framework.IsOptional && framework.IsEmbeded) { return(framework.Name + " (Optional & Embeded)"); } else if (framework.IsOptional) { return(framework.Name + " (Optional)"); } else if (framework.IsEmbeded) { return(framework.Name + " (Embeded)"); } else { return(framework.Name); } }, (ISD_Framework framework) => { framework.IsOptional = SA_EditorGUILayout.ToggleFiled("Optional", framework.IsOptional, SA_StyledToggle.ToggleType.YesNo); framework.IsEmbeded = SA_EditorGUILayout.ToggleFiled("Embeded", framework.IsEmbeded, SA_StyledToggle.ToggleType.YesNo); } ); EditorGUILayout.BeginHorizontal(); EditorStyles.popup.fixedHeight = 20; NewBaseFrameworkIndex = EditorGUILayout.Popup(NewBaseFrameworkIndex, ISD_FrameworkHandler.BaseFrameworksArray()); if (GUILayout.Button("Add Framework", GUILayout.Height(20))) { var type = ISD_FrameworkHandler.BaseFrameworksArray() [NewBaseFrameworkIndex]; NewBaseFrameworkIndex = 0; ISD_Framework f = new ISD_Framework(type); ISD_API.AddFramework(f); } EditorGUILayout.EndHorizontal(); SA_EditorGUILayout.HorizontalLine(); DrawEmbededBlock(); }