I have two identical instantiated objects in the game world. They both have the same script in them, and when they collide they both fire off the same error.
void OnTriggerEnter(Collider other)
{
colliderList.Add(other.gameObject);
}
void OnTriggerExit(Collider other)
{
colliderList.Remove(other.gameObject);
}
NullReferenceException: Object reference not set to an instance of an object objectCollision.OnTriggerExit (UnityEngine.Collider other)
I need to track(and sometimes modify) each objects colliders, so what am I doing wrong here?