The SceneObject to start the search from.
The string key of the component type to find (e.g., "Component.RenderMeshVisual").
OptionalmaxDepth: numberThe maximum number of levels to search down the hierarchy (for children).
The first matching Component found, or null if none is found.
[ByScriptType] Finds the first Component of a given script type on the SceneObject itself or in its children.
The SceneObject to start the search from.
The script type name (e.g., Interactable.getTypeName())) to find.
OptionalmaxDepth: numberThe maximum number of levels to search down the hierarchy (for children).
The first matching Component found, or null if none is found.
[ByKey] Finds the first Component of a given type on the SceneObject itself or in its children.