using System.Collections; using System.Collections.Generic; using UnityEngine; public class roomChecker : MonoBehaviour { public GameObject outerGrid; public GameObject caveGrid; private void OnTriggerEnter2D(Collider2D other) { if(other.tag == "Player"){ if(other.transform == playerNetwork.localPlayerTransform){ outerGrid.SetActive(false); caveGrid.SetActive(true); } } } private void OnTriggerExit2D(Collider2D other) { if(other.tag == "Player"){ if(other.transform == playerNetwork.localPlayerTransform){ outerGrid.SetActive(true); caveGrid.SetActive(false); } } } void Update() { } }