using System.Collections; using System.Collections.Generic; using UnityEngine; using Sirenix.OdinInspector; namespace KairoEngine.CharacterSystem { public class DoorTrigger : MonoBehaviour { public DoorController doorController; public List charactersInRange = new List(); void OnTriggerEnter(Collider co) { CharacterController character = co.gameObject.transform.root.GetComponentInChildren(); if(character == null) return; charactersInRange.Add(character); } void OnTriggerExit(Collider co) { CharacterController character = co.gameObject.transform.root.GetComponentInChildren(); if(character == null) return; charactersInRange.Remove(character); } } }