Searches for the first script component of a specific class type in the parent hierarchy of the given SceneObject.
The SceneObject whose parents to search.
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 of a specific class type in the parent hierarchy of the given SceneObject.