Skip to content

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_nametypedescription
indexnumberThe index value of the Transform.

Return

typedescription
TransformThe child Transform.

Code Example

typescript
OnStart(): void {
    let transform = this.transform;
    let child = transform.FindChild(0);
}