UnityLink`
UnityLink`

CreateUnityScene

CreateUnityScene[]

create a new scene.

CreateUnityScene["name"]

create a scene with the specified name.

CreateUnityScene[File["file"]]

create a named scene saved at the given file path relative to the Assets folder.

Details

  • CreateUnityScene returns the UnityScene it created, and $Failed if it cannot be created.
  • The following options can be given:
  • MethodAutomaticwhether the open scenes will be closed when creating the new scene
    "NewSceneSetup"Automaticwhether the default game objects should be added to the new scene

Examples

open allclose all

Basic Examples  (2)

Load the UnityLink:

Open a Unity project:

Create a new scene and save it in the Assets folder:

Create an untitled scene:

Create a scene with a specific name:

Create a named scene and save it in the Assets folder:

Options  (2)

Method  (1)

By default, all open scenes are closed when a new scene is created:

Use the Method option to create a new scene without closing the open scenes:

"NewSceneSetup"  (1)

By default, new scenes include default light and camera objects:

Use the "NewSceneSetup" option to create a new scene containing no game objects:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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