文档

Unity Engine

Unity Engine

GetChildIndexForId(int)

Gets the child index under the parent of the item with the specified ID.
阅读时间1 分钟最后更新于 1 个月前

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.