UnityLink`
UnityLink`

FindUnityGameObject

FindUnityGameObject["name"]

finds the Unity game object with the specified name.

FindUnityGameObject[patt]

finds the Unity game object with the name that matches the string pattern patt.

FindUnityGameObject[RegularExpression["regex"]]

finds the Unity game object with the name that matches the specified regular expression.

FindUnityGameObject[,n]

finds at most n Unity game objects.

更多信息

  • FindUnityGameObject[expr] returns the first UnityGameObject it found, Missing["Nonexistent"] if it was not found.
  • FindUnityGameObject[expr,n] returns a list of at most n game objects.
  • FindUnityGameObject[expr,All] finds all matching game objects in the open scenes.
  • FindUnityGameObject[All, All] finds all game objects in the open scenes.
  • FindUnityGameObject[] is the same as FindUnityGameObject[All, All].
  • FindUnityGameObject is Listable.

范例

打开所有单元关闭所有单元

基本范例  (3)

Load the Unity Link:

Open a Unity project:

Find a game object by name:

Get the position of the game object:

Find all game objects in the open scene:

Scope  (9)

Find a single game object by name:

Find a game object using a string pattern:

Find all game objects with names matching a string pattern:

Find game objects using abbreviated string patterns:

Find at most 3 game objects:

Find game objects using a RegularExpression:

Find all game objects in the current scene:

Find at most 3 game objects in the current scene:

FindUnityGameObject is Listable:

Applications  (2)

Find the number of game objects in the current scene:

Find the position of every game object in the current scene:

Plot the positions with Graphics3D.

Wolfram Research (2017),FindUnityGameObject,Wolfram 语言函数,https://reference.wolfram.com/language/UnityLink/ref/FindUnityGameObject.html.

文本

Wolfram Research (2017),FindUnityGameObject,Wolfram 语言函数,https://reference.wolfram.com/language/UnityLink/ref/FindUnityGameObject.html.

CMS

Wolfram 语言. 2017. "FindUnityGameObject." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/UnityLink/ref/FindUnityGameObject.html.

APA

Wolfram 语言. (2017). FindUnityGameObject. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/UnityLink/ref/FindUnityGameObject.html 年

BibTeX

@misc{reference.wolfram_2022_findunitygameobject, author="Wolfram Research", title="{FindUnityGameObject}", year="2017", howpublished="\url{https://reference.wolfram.com/language/UnityLink/ref/FindUnityGameObject.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2022_findunitygameobject, organization={Wolfram Research}, title={FindUnityGameObject}, year={2017}, url={https://reference.wolfram.com/language/UnityLink/ref/FindUnityGameObject.html}, note=[Accessed: 22-November-2024 ]}