// Start is called before the first frame update void Start() { if (singleton == null) { singleton = this; } else { Destroy(this.gameObject); return; } if (ActivePlayerCharacter == null) { ActivePlayerCharacter = FindObjectOfType <PlayerCharacter>(); if (ActivePlayerCharacter == null && PlayerCharacterPrefab != null) { ActivePlayerCharacter = GameObject.Instantiate(PlayerCharacterPrefab); // Do any player initialization here } } if (MainUI == null) { MainUI = FindObjectOfType <MainUI>(); if (MainUI == null && MainUIPrefab != null) { MainUI = GameObject.Instantiate(MainUIPrefab); // Do any UI initialization here } } metricsManager = new MetricsManager(); metricsManager.Initialize(); MapLayout.LoadMapFile(); }