private void Start() { try { SetupSkin(); var complex = UIManager.instance.transform.Find("panel_AstronautComplex"); #if DEBUG //DumpAssetBaseTextures(); //complex.gameObject.PrintComponents(new DebugLog("Complex")); #endif _applicantPanel = new AstronautComplexApplicantPanel(complex); _windowRect = _applicantPanel.PanelArea; _applicantPanel.Hide(); GameEvents.onGUIAstronautComplexSpawn.Add(AstronautComplexShown); GameEvents.onGUIAstronautComplexDespawn.Add(AstronautComplexHidden); enabled = false; } catch (Exception) // removed 'e' after Exception { // _log.Error("Error: Encountered unhandled exception: " + e); Destroy(this); } }
private void Start() { try { SetupSkin(); var complex = UIManager.instance.gameObject.GetComponentsInChildren<CMAstronautComplex>(true).FirstOrDefault(); if (complex == null) throw new Exception("Could not find astronaut complex"); _applicantPanel = new AstronautComplexApplicantPanel(complex); _windowRect = _applicantPanel.PanelArea; _applicantPanel.Hide(); GameEvents.onGUIAstronautComplexSpawn.Add(AstronautComplexShown); GameEvents.onGUIAstronautComplexDespawn.Add(AstronautComplexHidden); enabled = false; } catch (Exception e) { Debug.LogError("KSI: Encountered unhandled exception: " + e); Destroy(this); } }
private void Start() { try { SetupSkin(); var complex = UIManager.instance.gameObject.GetComponentsInChildren <CMAstronautComplex>(true).FirstOrDefault(); if (complex == null) { throw new Exception("Could not find astronaut complex"); } _applicantPanel = new AstronautComplexApplicantPanel(complex); _windowRect = _applicantPanel.PanelArea; _applicantPanel.Hide(); GameEvents.onGUIAstronautComplexSpawn.Add(AstronautComplexShown); GameEvents.onGUIAstronautComplexDespawn.Add(AstronautComplexHidden); enabled = false; } catch (Exception e) { Debug.LogError("KSI: Encountered unhandled exception: " + e); Destroy(this); } }