UnityLink`
UnityLink`

CloseUnityScene

CloseUnityScene[]

closes the active Unity scene.

CloseUnityScene["name"]

closes the Unity scene with the specified name.

CloseUnityScene[patt]

closes the Unity scene with the name matching the string pattern patt.

CloseUnityScene[RegularExpression["regex"]]

closes the Unity scene with the name matching the specified regular expression.

CloseUnityScene[,n]

closes at most n Unity scenes.

更多信息

  • If the active scene is closed, then the first open scene in the Hierarchy window will become the active scene. If there are no more open scenes, then a new default scene will be created and become the active scene.
  • CloseUnityScene[expr] closes the first open Unity scene it finds.
  • CloseUnityScene[expr,n] closes at most n scenes.
  • CloseUnityScene[expr,All] closes all matching scenes.
  • CloseUnityScene[All] closes all open scenes.
  • CloseUnityScene is Listable.

范例

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

基本范例  (2)

Load the UnityLink:

Open a Unity project:

Open multiple scenes:

Close the active scene:

Close the active scene:

Close a scene by name:

Close a scene using a string pattern:

Use abbreviated string patterns:

Close multiple scenes using a string pattern:

Close multiple scenes using a RegularExpression:

Find all open scenes:

Find at most 2 scenes:

CloseUnityScene is Listable:

Properties & Relations  (1)

Supplying a list of scenes to $OpenUnityScenes will close any open scenes not in the provided list:

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

文本

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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