UnityLink`
UnityLink`

UnityCurrentValue

UnityCurrentValue[item]

gives the current value of item in the Unity editor and engine.

Details

  • Values for appropriate items can be set using UnityCurrentValue[item]=val.
  • Possible items that can be used in UnityCurrentValue include:
  • "Playing"True if Unity is in Play mode
    "Paused"True if Unity is paused
    "ActiveScene"the current active scene
    "OpenScenes"a list of currently open scenes

Examples

Basic Examples  (2)

Load the UnityLink:

In[1]:=
Click for copyable input

Open a Unity project:

In[2]:=
Click for copyable input

Get the Play mode of the Unity editor:

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

Set the Play mode to be True:

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