Searches for a given component type in the parent hierarchy of the given object.
The object to start the search from - this object is also included in the search.
The type of the component to search for.
If true, also inactive components are returned. Default is false.
The first component of the given type found in the parent hierarchy of the given object.
const myComponent = getComponentInParent(myObject, MyComponent); Copy
const myComponent = getComponentInParent(myObject, MyComponent);
Searches for a given component type in the parent hierarchy of the given object.