public void Awake() { // This thing gets instantiated 4 times by KSP for some reason if (Fetch != null) return; Fetch = this; var gObj = new GameObject("kOSTermWindow", typeof (TerminalWindow)); DontDestroyOnLoad(gObj); Window = (TerminalWindow) gObj.GetComponent(typeof (TerminalWindow)); Window.Core = this; }
public void Awake() { // This thing gets instantiated 4 times by KSP for some reason if (Fetch != null) { return; } Fetch = this; var gObj = new GameObject("kOSTermWindow", typeof(TerminalWindow)); DontDestroyOnLoad(gObj); Window = (TerminalWindow)gObj.GetComponent(typeof(TerminalWindow)); Window.Core = this; }