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 Name | Type | Description |
---|---|---|
IsReadOnly | bool | Returns true if the Item can only be read |
Position | float3 | Gets or Sets the position of a Transform |
Rotation | float4 | Gets or Sets the rotation of a Transform |
LocalSize | float3 | Gets or Sets the localScale of a Transform |
LocalPosition | float3 | Gets or Sets the localPosition of a Transform |
LocalRotation | float4 | Gets or Sets the localRotation of a Transform |
Name | string | Gets the name of the Transform |
Enabled | bool | Gets or Sets the enabled status |
Parent | Item | Gets or Sets the Item's parent |
ChildCount | int | Gets the amount of children under a Transform |
Children | Item[] | Gets all the children of an Item |
CanCollide | bool | Gets or Sets the collision ability of a Collider attached to an Item |
Collider | Collider | Gets the Collider attached to an Item |
Colliders | Collider[] | Gets all Colliders attached to an Item |
Path | string | Gets the Item's path in the hierarchy (Readonly) |
Methods
Method Name | Return Type | Parameters | Description |
---|---|---|---|
GetChildByIndex | Item | int | Gets the child Item by index |
GetChildByName | Item | string | Gets the child Item by name |
Duplicate | Item | string ¹ | Creates a duplicate of the Item with an optional name |
GetComponent | object | string | Returns an Attached Component |
¹ Optional parameter