private void Awake() { _mainCamera = Camera.main; _screenLimits = FindObjectOfType <ScreenLimits>(); _bounds = GetComponent <SpriteRenderer>().bounds; }
private void Awake() { _screenLimits = FindObjectOfType <ScreenLimits>(); transform.localScale = new Vector3( _fitX ? _screenLimits.ScreenSizeUnits.x : transform.localScale.x, _fitY ? _screenLimits.ScreenSizeUnits.y : transform.localScale.y, transform.localScale.z); }
private void Awake() { _instance = this; }