void OnEnable() { if (starMap == null) { starMap = FindObjectOfType <StarMap> (); } transform.position = starMap.transform.position + new Vector3(starMap.GetMapsize() / 2f, 0, 0); Camera.main.orthographicSize = 1.1f * starMap.GetMapsize() / (2 * Camera.main.aspect); }