using UnityEngine; public class GameHandler : MonoBehaviour { private MapGenManager mapGen; // Start is called once before the first execution of Update after the MonoBehaviour is created void Awake() { mapGen = GetComponent(); mapGen.OnGenerationComplete += HandleStart; } void Start() { } // Update is called once per frame void Update() { } private void HandleStart(MapGenManager map) { var Rooms = map.GridToRoom; /*----- For now only open the doors -----*/ foreach (var room in mapGen.GridToRoom) { var rh = room.Value.GetComponent(); } } }