• Searches for a given component type in the parent hierarchy of the given object.

    Type Parameters

    Parameters

    • obj: Object3D

      The object to start the search from - this object is also included in the search.

    • componentType: Constructor<T>

      The type of the component to search for.

    Returns null | T

    The first component of the given type found in the parent hierarchy of the given object.

    const myComponent = getComponentInParent(myObject, MyComponent);
    
MMNEPVFCICPMFPCPTTAAATR