public static void DrawAddonRequestUI(UM_Addon addon) { EditorGUILayout.HelpBox("Ultimate Mobile " + addon + " Addon required", MessageType.Warning); using (new SA_GuiBeginHorizontal()) { GUILayout.FlexibleSpace(); var content = new GUIContent(" " + addon + " Addon", UM_Skin.GetPlatformIcon("unity_icon.png")); var click = GUILayout.Button(content, EditorStyles.miniButton, GUILayout.Width(120), GUILayout.Height(18)); if (!click) { return; } string url; switch (addon) { case UM_Addon.AdMob: url = k_AdMobAddon; break; case UM_Addon.Playmaker: url = k_PlaymakerAddon; break; default: throw new ArgumentOutOfRangeException("addon", addon, null); } SA_PackageManager.DownloadAndImport(addon + " Addon", url, interactive: false); } }
protected override void OnCreate() { base.OnCreate(); m_pluginsToolbar = new SA_HyperToolbar(); m_pluginsToolbar.SetButtonsHeight(TOOLBAR_BUTTONS_HEIGHT); m_pluginsToolbar.SetItemsSapce(TOOLBAR_BUTTONS_SPACE); AddPlatform("Unified", UM_Skin.GetDefaultIcon("ultimate_icon_pro.png")); AddPlatform("Android", UM_Skin.GetPlatformIcon("android_icon.png")); AddPlatform("iOS", UM_Skin.GetPlatformIcon("ios_icon.png")); m_pluginsToolbar.SetSelectedIndex((int)UM_UIPlatform.Unified); }
public override void OnLayoutEnable() { base.OnLayoutEnable(); var content = new GUIContent("iOS Build Requirements", UM_Skin.GetPlatformIcon("ios_icon.png")); m_IOSRequirements = new SA_CollapsableWindowBlockLayout(content, () => { XCodeRequirements(); }); content = new GUIContent("Android Build Requirements", UM_Skin.GetPlatformIcon("android_icon.png")); m_AndroidRequirements = new SA_CollapsableWindowBlockLayout(content, () => { AndroidRequirements(); }); content = new GUIContent("Unity Project Requirements ", UM_Skin.GetPlatformIcon("unity_icon.png")); m_UnityRequirements = new SA_CollapsableWindowBlockLayout(content, () => { DefineSymbols(); }); m_LearnMoreLink = new SA_PluginActiveTextLink("[?] Learn More"); }
public UM_ServicePlatfromInfo(UM_UIPlatform platform, UM_NativeServiceSettings settings) { this.platform = platform; m_settings = settings; switch (platform) { case UM_UIPlatform.IOS: m_content = new GUIContent(" iOS (" + m_settings.ServiceName + ")", UM_Skin.GetPlatformIcon("ios_icon.png")); break; case UM_UIPlatform.Android: m_content = new GUIContent(" Android (" + m_settings.ServiceName + ")", UM_Skin.GetPlatformIcon("android_icon.png")); break; } m_layout = new UM_PlatfromStateLayout(m_content); }
public static void DrawAddonRequestUI(UM_Addon addon) { EditorGUILayout.HelpBox("Ultimate Mobile " + addon + " Addon required", MessageType.Warning); using (new SA_GuiBeginHorizontal()) { GUILayout.FlexibleSpace(); var content = new GUIContent(" " + addon + " Addon", UM_Skin.GetPlatformIcon("unity_icon.png")); var click = GUILayout.Button(content, EditorStyles.miniButton, GUILayout.Width(120), GUILayout.Height(18)); if (click) { string url = null; switch (addon) { case UM_Addon.AdMob: url = ADMOB_ADDON; break; case UM_Addon.Playmaker: url = PLAYMAKER_ADDON; break; } SA_PackageManager.DownloadAndImport(addon + " Addon", url, interactive: false); } } }
public UM_AdvertisementPlatfromUI(string name, string image, SA_iAPIResolver resolver, Action onGUI) : base(new GUIContent(name, UM_Skin.GetPlatformIcon(image)), onGUI) { m_on = new GUIContent("ON"); m_off = new GUIContent("OFF"); m_stateLabel = new SA_HyperLabel(m_on, EditorStyles.boldLabel); m_stateLabel.SetMouseOverColor(SA_PluginSettingsWindowStyles.SelectedElementColor); m_resolver = resolver; }