Destroy Problem (9329)

Hello Everybody,

I want destroy a object but I get this error. How can i destroy this object?

"Can't remove component.

Can't remove Transform because MeshFilter, MeshRenderer, BoxCollider depends on it"

Regards

1 Answer

1

You're trying to destroy the Transform, instead of the whole object.

Instead use:

Destroy(gameObject)

Or check out the full Destroy scripting reference.

Hello Bongo, Thank you for reply but my object is not transform var object : GameObject; Destroy (object ); I make a lot of control about that but my object is gameobject everytime. Regards