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