The SceneObject to start the search from.
The string key of the component type to find (e.g., "Component.RenderMeshVisual").
OptionalmaxLevels: numberThe maximum number of levels to search up the hierarchy.
The first matching Component found, or null if none is found.
[ByScriptType] Finds the first Component of a given script type in the parents of a SceneObject, searching recursively upwards.
The SceneObject to start the search from.
The script type name (e.g., Interactable.getTypeName())) to find.
OptionalmaxLevels: numberThe maximum number of levels to search up the hierarchy.
The first matching Component found, or null if none is found.
[ByKey] Finds the first Component of a given type in the parents of a SceneObject, searching recursively upwards.