GetComponentIndex(Component)
Retrieves the index of the specified component in the array of components attached to the GameObject.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public int GetComponentIndex(Component component)
Parameters
The component to search for.
Returns
Type | Description |
|---|---|
| int | The index of the specified Component if it exists. Otherwise, returns |