protected void SetSize() { bounds = GameObject.Find("Game Master").GetComponent <ObjBoundary>(); Vector3 oldSize = this.transform.localScale; float s = bounds.getCamSize(); this.transform.localScale = new Vector3(bounds.getScreenWidth() / s * oldSize.x, bounds.getScreenWidth() / s * oldSize.y, 1); }
void SetSize() { this.transform.localScale = new Vector3(bounds.getScreenWidth(), bounds.getScreenHeight(), 1); this.transform.position = new Vector3(0, 0, 1); }