As the question says, does
Destroy(myGameObject);
destroy all attached components? monobehaviours, materials etc…
thanks
As the question says, does
Destroy(myGameObject);
destroy all attached components? monobehaviours, materials etc…
thanks
“Yes” - Says the docs.
If obj is a GameObject it will destroy the GameObject, all its components and all transform children of the GameObject.
Check the wiki for the meaning of Documentation
.
To sum it up: The docs is something you should always refer to BEFORE asking a question.
ye it removes the object from the scene and anything contained in it i.e components or other objects within it