delete the Unity game object obj.
DeleteUnityGameObject["name"]
delete the Unity game object with the specified name.


DeleteUnityGameObject
delete the Unity game object obj.
DeleteUnityGameObject["name"]
delete the Unity game object with the specified name.
Details and Options
- DeleteUnityGameObject destroys the game object, and releases any references to obj.
- DeleteUnityGameObject[All] destroys all the game objects in the current scene.
- DeleteUnityGameObject is Listable.
Examples
open all close allBasic Examples (2)
Scope (4)
Delete a Unity game object by name:
Find and delete a Unity game object:
DeleteUnityGameObject is Listable:
DeleteUnityGameObject[All] destroys all the Unity game objects in the current scene:
Possible Issues (1)
A UnityGameObject cannot be accessed after deletion:

Related Guides
Text
Wolfram Research (2019), DeleteUnityGameObject, Wolfram Language function, https://reference.wolfram.com/language/UnityLink/ref/DeleteUnityGameObject.html.
CMS
Wolfram Language. 2019. "DeleteUnityGameObject." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/UnityLink/ref/DeleteUnityGameObject.html.
APA
Wolfram Language. (2019). DeleteUnityGameObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/UnityLink/ref/DeleteUnityGameObject.html
BibTeX
@misc{reference.wolfram_2025_deleteunitygameobject, author="Wolfram Research", title="{DeleteUnityGameObject}", year="2019", howpublished="\url{https://reference.wolfram.com/language/UnityLink/ref/DeleteUnityGameObject.html}", note=[Accessed: 16-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_deleteunitygameobject, organization={Wolfram Research}, title={DeleteUnityGameObject}, year={2019}, url={https://reference.wolfram.com/language/UnityLink/ref/DeleteUnityGameObject.html}, note=[Accessed: 16-August-2025]}