Hello all,
I am storing the objects which is collided by a ray from the screen.
//lockedObjects is an Array of GameObject type
lockedObjects[lockedObjectsCount-1] = hit.collider.gameObject;
But during the game play, some of the objects are destroyed by colliding with each other. By the time, I tried to access those objects, it is saying this.
“MissingReferenceException: The object of type ‘DroneCollision_CSharp’ 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.”
Give me suggestion how to check for whether the GameObject I stored in an array is still exist?
Thanks in Advance.