public void Update(Install install) { var update = new Updater(this, this, GithubApi, Logger); update.Update(install); var reimports = Installs.Where(i => i.ConfigData.RequiresFullReimport && !i.InstallFinalized).ToArray(); if (reimports.Any()) { var msg = "Following packages require full reimport to function properly:\n"; foreach (var reimport in reimports) { msg += reimport.ToShortString() + "\n"; } ThreadingUtils.DispatchOnMainThread(() => { if (EditorUtility.DisplayDialog("Koinonia", msg, "Ok", "No, I'll do it myself")) { EditorApplication.ExecuteMenuItem("Assets/Reimport All"); } else { AssetDatabase.Refresh(); } }); } else { ThreadingUtils.DispatchOnMainThread(AssetDatabase.Refresh); } }
public void UninstallNode(Install selectedPackage) { var installation = new Uninstallation(this, this, GithubApi, Logger); var result = installation.Uninstall(selectedPackage); if (selectedPackage.ConfigData.RequiresFullReimport) { var msg = "Deinstalled package requires full reimport " + selectedPackage.ToShortString(); ThreadingUtils.DispatchOnMainThread(() => { if (EditorUtility.DisplayDialog("Koinonia", msg, "Ok", "No, I'll do it myself")) { EditorApplication.ExecuteMenuItem("Assets/Reimport All"); } else { AssetDatabase.Refresh(); } }); } else { ThreadingUtils.DispatchOnMainThread(AssetDatabase.Refresh); } }
public static void Refresh() { ThreadingUtils.WaitOnMainThread(AssetDatabase.Refresh); }
static KoinoniaWindow() { ThreadingUtils.Initialize(); }