DeleteUnityToggle
deletes the Unity toggle component comp.
deletes the Unity toggle component attached to the UnityGameObject obj.
deletes the Unity toggle component with the specified name.
Details
- DeleteUnityToggle destroys the Unity toggle component, and releases all references to it.
- DeleteUnityToggle[All] destroys all the toggle components in the current scene.
- DeleteUnityToggle is Listable.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Load the package and open a project:

https://wolfram.com/xid/01j8jy8he3rawq6xyhyru-yj1drt

https://wolfram.com/xid/01j8jy8he3rawq6xyhyru-0ggby4
Create a Unity toggle component:

https://wolfram.com/xid/01j8jy8he3rawq6xyhyru-z8r6tu

Delete a Unity toggle component:

https://wolfram.com/xid/01j8jy8he3rawq6xyhyru-lqhihh
Possible Issues (1)Common pitfalls and unexpected behavior
A UnityToggle cannot be accessed after deletion:

https://wolfram.com/xid/01j8jy8he3rawq6xyhyru-qfg4jm


https://wolfram.com/xid/01j8jy8he3rawq6xyhyru-ji5ikx

https://wolfram.com/xid/01j8jy8he3rawq6xyhyru-yh8es3


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