Format
typescript
Transform.GetChild(index)class: Transform
Description
Get the child Transform at the specified index (index starts from 0).
If the transform does not have any children, or if the value of the index parameter is greater than the number of children, it will return nil. The number of children can be obtained using Transform.childCount.
Parameters
| param_name | type | description |
|---|---|---|
| index | number | The index value of the Transform. |
Return
| type | description |
|---|---|
Transform | The child Transform. |
Code Example
typescript
OnStart(): void {
let transform = this.transform;
let child = transform.FindChild(0);
}