// Use this for initialization void Start() { sceneManager = GameObject.Find("SceneManager").GetComponent<SceneManager>(); List<GameObject> players = sceneManager.getPlayers(); GameObject p1 = (GameObject)players[0], p2 = (GameObject)players[1]; tCharacter1 = p1.transform; tCharacter2 = p2.transform; calculateScreen(tCharacter1, tCharacter2); initialHorizontalDistance = (2*this.camera.orthographicSize*this.camera.aspect) - margin; initialVerticalDistance = this.camera.orthographicSize; }