i have been trying to destroy the exact object that i created with Instantiate().
but i keep getting various errors
here is what i currently have:
Object obje;
obje = Instantiate (obtype, transform.position, Quaternion.identity);
Destroy(obje);
the error in this code is that i “can’t destroy tranform component. call destroy on the game object.”
so, how do i call destroy on the game object if i have the transform?
when i search i see that i should be able to type
Destroy(obje.GameObject);
but that doesn’t work either.
can someone please tell how to destroy the exact item that created or point me in the right direction?