UnityLink`
UnityLink`

UnityComponentQ

UnityComponentQ[obj]

gives True if obj is a valid component of a Unity game object, and False otherwise.

Details

  • In Unity, a component is a type of object that must be attached to a game object. Together, these components add various functionality to your scene, such as physics and rendering. In the Wolfram Language, each component is represented by a unique symbol, such as UnityRigidbody and UnityMeshRenderer.
  • UnityComponentQ can be used to distinguish components from other Unity object types, such as UnityGameObject and UnityScene.

Examples

Basic Examples  (2)

Load the UnityLink:

Open a Unity project:

Test whether an expression is a Unity component:

A UnityGameObject is not a Unity component:

Wolfram Research (2019), UnityComponentQ, Wolfram Language function, https://reference.wolfram.com/language/UnityLink/ref/UnityComponentQ.html.

Text

Wolfram Research (2019), UnityComponentQ, Wolfram Language function, https://reference.wolfram.com/language/UnityLink/ref/UnityComponentQ.html.

CMS

Wolfram Language. 2019. "UnityComponentQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/UnityLink/ref/UnityComponentQ.html.

APA

Wolfram Language. (2019). UnityComponentQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/UnityLink/ref/UnityComponentQ.html

BibTeX

@misc{reference.wolfram_2022_unitycomponentq, author="Wolfram Research", title="{UnityComponentQ}", year="2019", howpublished="\url{https://reference.wolfram.com/language/UnityLink/ref/UnityComponentQ.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2022_unitycomponentq, organization={Wolfram Research}, title={UnityComponentQ}, year={2019}, url={https://reference.wolfram.com/language/UnityLink/ref/UnityComponentQ.html}, note=[Accessed: 21-December-2024 ]}