UNITY LINK

Working With Properties of Unity Objects

You can discover, access and modify properties of Unity objects.

Load the UnityLink package and open a project:

Get a unity object:

You can manipulate properties of a Unity object obj using part specification obj[["prop"]].

Discover Properties

obj[["Properties"]] gives a list of all available properties of the Unity object obj.

  • Unity objects of different types have different properties available to them.

Access a Property

obj[["prop"]] extracts the value corresponding to the property "prop" of a Unity object obj.

Extract multiple properties using a list:

Modify a Property

obj[["prop"]] = val changes the value of the property prop to val.

Change multiple properties using a list :

Work with Component Properties

obj[["comp", "prop"]] can be used to extract the value of a property "prop" associated to a Unity component "comp" of a Unity object obj.

Get the position from the transform component:

Move the object:

  • Properties of the Transform component are accessible directly from the game object.