/***MonoBehaviour Functions***/ void Awake() { //This is the only Manager_World on a GameObject if (world == null) { DontDestroyOnLoad(gameObject); world = this; } //This is NOT the only Manager_World on a GameObject else { Destroy(gameObject); } }
void Start() { manager_World = GameObject.Find("World").GetComponent <Manager_World> (); world = manager_World.BuildWorld(); }