GameObjectExtensions.HasComponentInParent<T>
Extension Method in GameObjectExtensions
Declaration
public static bool HasComponentInParent<T>(this GameObject gameObject)
Description
Checks if the game object has a component of the specified type on itself or any of its parents.
Type Parameters
T | The type of component to check for. |
Parameters
gameObject | The game object to check for the component. |
Returns
bool | True if the component exists, false otherwise. |