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 all close all

Basic Examples  (2)

Load the UnityLink:

In[1]:=
Click for copyable input

Open a Unity project:

In[2]:=
Click for copyable input

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

In[1]:=
Click for copyable input
Out[1]=

Create an untitled scene:

In[1]:=
Click for copyable input
Out[1]=

Create a scene with a specific name:

In[1]:=
Click for copyable input
Out[1]=

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

In[1]:=
Click for copyable input
Out[1]=

Options  (2)