FindUnityComponent
FindUnityComponent[obj,"type"]
finds the component on the game object obj and type "type".
FindUnityComponent["name",…]
finds the component on the game object with name "name".
FindUnityComponent[patt, …]
finds the component on the game object with name matching the string pattern patt.
FindUnityComponent[…,n]
finds at most n components.
更多信息
- FindUnityComponent returns the first Unity game object component it found, Missing["Nonexistent"] if none were found.
- The following option can be specified:
-
Method "Self" search bounds in the transform hierarchy - Possible Method settings include:
-
"Self" searches only the game object "Ancestors" searches the game object and its ancestors "Descendants" searches the game object and its descendants - FindUnityComponent[…,n] returns a list of at most n components.
- FindUnityComponent[…,All] finds all matching components.
- FindUnityComponent[All] finds all components in the open scenes.
范例
打开所有单元关闭所有单元基本范例 (4)
Scope (7)
Find a component from a UnityGameObject reference:
Find a component from the name of the game object:
Find the first three components on a game object:
Find all the components on a game object:
Find all the components of a certain type:
文本
Wolfram Research (2019),FindUnityComponent,Wolfram 语言函数,https://reference.wolfram.com/language/UnityLink/ref/FindUnityComponent.html.
CMS
Wolfram 语言. 2019. "FindUnityComponent." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/UnityLink/ref/FindUnityComponent.html.
APA
Wolfram 语言. (2019). FindUnityComponent. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/UnityLink/ref/FindUnityComponent.html 年