private void Awake() { if (PlayerPrefs.HasKey("KSPCalc.Main.X") && PlayerPrefs.HasKey("KSPCalc.Main.Y")) { _screenRect.x = PlayerPrefs.GetFloat("KSPCalc.Main.X"); _screenRect.y = PlayerPrefs.GetFloat("KSPCalc.Main.Y"); } GameEvents.onGUIApplicationLauncherReady.Add(AddButton); _engineSelector = gameObject.AddComponent<EngineSelector>(); }
private void Awake() { if (PlayerPrefs.HasKey("KSPCalc.Main.X") && PlayerPrefs.HasKey("KSPCalc.Main.Y")) { _screenRect.x = PlayerPrefs.GetFloat("KSPCalc.Main.X"); _screenRect.y = PlayerPrefs.GetFloat("KSPCalc.Main.Y"); } GameEvents.onGUIApplicationLauncherReady.Add(AddButton); _engineSelector = gameObject.AddComponent <EngineSelector>(); }