private void OnToggleOff() { if (MuestraUI.CoolUICanvas != null) { FindObjectOfType <CamInsight>().scala = MuestraUI.CoolUICanvas.transform.localScale; FindObjectOfType <CamInsight>().posi = MuestraUI.CoolUICanvas.transform.localPosition; FindObjectOfType <CamInsight>().SaveZoom(); MuestraUI.Destroy(); guiactivada = false; } }
void Update() { if (HighLogic.LoadedSceneIsFlight) { camin = FindObjectOfType <CamInsight>(); if (camin == null) { if (MuestraUI.CoolUICanvas != null) { MuestraUI.Destroy(); guiactivada = false; } OnDisable(); } } }