UnityLink`
UnityLink`

FindUnityScene

FindUnityScene[]

finds the active Unity scene.

FindUnityScene["name"]

finds the open Unity scene with the specified name.

FindUnityScene[patt]

finds the open Unity scene with the name matching the string pattern patt.

FindUnityScene[RegularExpression["regex"]]

finds the open Unity scene with the name matching the specified regular expression.

FindUnityScene[,n]

finds at most n open Unity scenes.

更多信息

  • FindUnityScene[expr] returns the first UnityScene it found, Missing["Nonexistent"] if no scenes were found.
  • FindUnityScene[expr,n] returns a list of at most n scenes.
  • FindUnityScene[expr,All] finds all matching open scenes.
  • FindUnityScene[All] finds all open scenes.
  • FindUnityScene is Listable.

范例

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

基本范例  (2)

Load the UnityLink:

Open a Unity project:

Open multiple scenes:

Find the active scene:

Scope  (9)

Find the active scene:

Find a scene by name:

Find a scene using a string pattern:

Use abbreviated string patterns:

Find multiple scenes using a string pattern:

Find multiple scenes using a RegularExpression:

Find all open scenes:

Find at most 2 scenes:

FindUnityScene is Listable:

Applications  (3)

Change the active scene:

Change the order of the open scenes in the Hierarchy window:

Add all open scenes to the build settings:

Properties & Relations  (2)

Both FindUnityScene[] and $ActiveUnityScene return the active scene:

Both FindUnityScene[All] and $OpenUnityScenes return all open scenes:

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

文本

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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