Hi there,
Unity 2020.3.15f1 Personal
I have followed your boids tutorial and am using it to control fish in my game. In this game, I wish to destroy a flock agent. However, when this happens, I get this error: MissingReferenceException: The object of type 'FlockAgent' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. I am destroying it using Destroy(col.transform.gameObject). What can I do to bypass this?
Hi there,
Unity 2020.3.15f1 Personal
I have followed your boids tutorial and am using it to control fish in my game. In this game, I wish to destroy a flock agent. However, when this happens, I get this error:
MissingReferenceException: The object of type 'FlockAgent' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object.I am destroying it usingDestroy(col.transform.gameObject). What can I do to bypass this?