Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetChildIndexForId(int)

Gets the child index under the parent of the item with the specified ID.
Read time 1 minuteLast updated 10 days ago

Definition

public int GetChildIndexForId(int id)

Parameters

id

The item ID.

Returns

Type

Description

intThe child index under the parent. Returns -1 if the item has no parent or doesn't exist in the tree.