Summary
Finds a component of the specified `componentType` on the `gameObject` or any of its parents or children.
If multiple components are found the one with a name closest to the `nameHint` is chosen.
- Assembly
- Kybernetik
.InspectorGadgets .dll - Namespace
- InspectorGadgets
- Containing Type
- IGUtils
Syntax
public static Component GetComponentInHierarchy(GameObject gameObject, Type componentType, string nameHint)
Parameters
Name | Type | Description |
---|---|---|
gameObject | GameObject | |
componentType | Type | |
nameHint | string |
Return Value
Type | Description |
---|---|
Component |