Skip to main content

Item

info

This class is only available on LocalAvatarScripts and LocalScripts

Items are the universal object for Unity clients to allow interfacing between Transforms and User-Generated Code.

danger
  • This type CANNOT be networked! Attempting to serialize a Network Message will fail!
  • Items CANNOT be created by the client. Attempting to instantiate an Item will throw an Exception.

Properties

Property NameTypeDescription
IsReadOnlyboolReturns true if the Item can only be read
Positionfloat3Gets or Sets the position of a Transform
Rotationfloat4Gets or Sets the rotation of a Transform
LocalSizefloat3Gets or Sets the localScale of a Transform
LocalPositionfloat3Gets or Sets the localPosition of a Transform
LocalRotationfloat4Gets or Sets the localRotation of a Transform
NamestringGets the name of the Transform
EnabledboolGets or Sets the enabled status
ParentItemGets or Sets the Item's parent
ChildCountintGets the amount of children under a Transform
ChildrenItem[]Gets all the children of an Item
CanCollideboolGets or Sets the collision ability of a Collider attached to an Item
ColliderColliderGets the Collider attached to an Item
CollidersCollider[]Gets all Colliders attached to an Item
PathstringGets the Item's path in the hierarchy (Readonly)

Methods

Method NameReturn TypeParametersDescription
GetChildByIndexItemintGets the child Item by index
GetChildByNameItemstringGets the child Item by name
DuplicateItemstring¹Creates a duplicate of the Item with an optional name
GetComponentobjectstringReturns an Attached Component

¹ Optional parameter