using System.Collections; using System.Collections.Generic; using UnityEngine; public class RoomCounter : MonoBehaviour { private RoomTemplate template; void Start() { template = GameObject.FindGameObjectWithTag("Rooms").GetComponent(); template.rooms.Add(this.gameObject); } }