public static void OnGUI_Footer(string pluginName, string pluginVersion, string helpURL, string documentationURL) { GUILayout.BeginHorizontal(); string versionTip = ""; if (I2Analytics.HasNewVersion(pluginName)) { versionTip = "There is a new version of " + pluginName + ".\nClick here for more details"; if (GUILayout.Button(new GUIContent("", versionTip), EditorStyles.label, GUILayout.Width(25))) { I2AboutWindow.DoShowScreen(); } var rect = GUILayoutUtility.GetLastRect(); rect.yMin = rect.yMax - 25; rect.xMax = rect.xMin + 25; rect.y += 3; GUI.DrawTexture(rect, GUI.skin.GetStyle("CN EntryWarn").normal.background); } if (GUILayout.Button(new GUIContent("v" + pluginVersion, versionTip), EditorStyles.miniLabel)) { I2AboutWindow.DoShowScreen(); } GUILayout.FlexibleSpace(); if (GUILayout.Button("Ask a Question", EditorStyles.miniLabel)) { Application.OpenURL(helpURL); } GUILayout.Space(10); if (GUILayout.Button("Documentation", EditorStyles.miniLabel)) { Application.OpenURL(documentationURL); } GUILayout.EndHorizontal(); }
static void CheckIfAnyPluginNeedsUpgrading() { EditorApplication.update -= CheckIfAnyPluginNeedsUpgrading; for (int i = 0; i < I2AboutWindow.PluginsData.Plugins.Length; ++i) { string InstalledVersion = string.Empty; bool ShouldUpgrade = false; bool HasNewBeta = false; bool ShouldSkip = false; I2AboutWindow.GetShouldUpgrade(I2AboutWindow.PluginsData.Plugins[i], out InstalledVersion, out ShouldUpgrade, out HasNewBeta, out ShouldSkip); if (InstalledVersion == "none" || ShouldSkip) { continue; } if ((ShouldUpgrade && I2AboutWindow.bNotifyOfNewMainVersions) || (HasNewBeta && I2AboutWindow.bNotifyOfNewBetas)) { I2AboutWindow.DoShowScreen(); return; } } }