static MCSUpgrade() { //Have we shown the popup for 1.0->1.6? UpgradeMeta meta = GetMeta(); bool shouldShowPopup = !meta.disabled && !meta.hideOneDotSixPopup; if (meta.installed != null && meta.installed.Length != 3) { //we might have pending packages string[] paths = Directory.GetFiles(pathToPackages, "*.unitypackage", SearchOption.TopDirectoryOnly); if (meta.installed == null) { meta.installed = new string[] { }; } List <string> pending = new List <string>(); for (int i = 0; i < paths.Length; i++) { string basePath = Application.dataPath; string path = paths[i].Replace(@"\", @"/").Replace(basePath, ""); bool newPackage = true; for (int j = 0; j < meta.installed.Length; j++) { if (meta.installed[j].Equals(path)) { newPackage = false; break; } } if (newPackage) { UnityEngine.Debug.Log("Need to install: " + path); pending.Add(path); } } if (pending.Count > 0) { window = MCSUpgradeWindow.Instance; window.packageQueue = pending; window.deleteQueue = new List <string>(); } } if (shouldShowPopup) { window = MCSUpgradeWindow.Instance; } }
static MCSUpgrade() { //Have we shown the popup for 1.0->1.6? UpgradeMeta meta = GetMeta(); if (!meta.hideOneDotSixPopup) { MCSUpgradeWindow window = MCSUpgradeWindow.Instance; } }
void OnDisable() { _instance = null; }
void OnEnable() { _instance = this; }
public static void MenuItemShowUpgradeWindow() { window = MCSUpgradeWindow.Instance; }