Searches for the first script component on the SceneObject itself, then in its parent hierarchy.
The SceneObject to start the search from.
The constructor/class of the script component to search for.
Maximum number of parent levels to search.
The first script component found, or null if none exists.
Searches for the first script component on the SceneObject itself, then in its parent hierarchy.