Fixed issue with the toolbar icons not being created.
--- a/KerbalEngineer/Editor/BuildToolbar.cs
+++ b/KerbalEngineer/Editor/BuildToolbar.cs
@@ -42,6 +42,14 @@
{
GameEvents.onGUIApplicationLauncherReady.Add(this.OnGuiAppLauncherReady);
Logger.Log("BuildToolbar->Awake");
+ }
+
+ private void Start()
+ {
+ if (button == null)
+ {
+ OnGuiAppLauncherReady();
+ }
}
private void OnDestroy()
--- a/KerbalEngineer/Flight/ActionMenu.cs
+++ b/KerbalEngineer/Flight/ActionMenu.cs
@@ -55,6 +55,14 @@
Logger.Log("ActionMenu was created.");
}
+ protected void Start()
+ {
+ if (button == null)
+ {
+ OnGuiAppLauncherReady();
+ }
+ }
+
protected void OnDestroy()
{
try
@@ -62,7 +70,10 @@
GameEvents.onGUIApplicationLauncherReady.Remove(this.OnGuiAppLauncherReady);
GameEvents.onHideUI.Remove(this.OnHide);
GameEvents.onShowUI.Remove(this.OnShow);
- ApplicationLauncher.Instance.RemoveModApplication(this.button);
+ if (button != null)
+ {
+ ApplicationLauncher.Instance.RemoveModApplication(this.button);
+ }
}
catch (Exception ex)
{