// ========================================================================= // ========================================================================= // METHODS UNITY ----------------------------------------------------------- void Start() { Config = GameObject.FindWithTag("Config").GetComponent <Config> (); ScreenPosition = gameObject.GetComponent <GuiScreenPosition> (); if (Background) { BackgroundTrans = Background.transform; } if (Cam.aspect >= 1) { ScreenPosition.SetCameraAspect(Cam.rect.width / Cam.rect.height); } else { ScreenPosition.SetCameraAspect(Cam.rect.height / Cam.rect.width); } }
// ========================================================================= // ========================================================================= // METHODS UNITY ----------------------------------------------------------- void Start() { Config = GameObject.FindWithTag ( "Config" ).GetComponent<Config> (); ScreenPosition = gameObject.GetComponent<GuiScreenPosition> (); if ( Background ) { BackgroundTrans = Background.transform; } if ( Cam.aspect >= 1 ) { ScreenPosition.SetCameraAspect ( Cam.rect.width/Cam.rect.height ); } else { ScreenPosition.SetCameraAspect ( Cam.rect.height/Cam.rect.width ); } }