GameObjectExtensions.HasComponent<T>

Extension Method in GameObjectExtensions

Declaration

public static bool HasComponent<T>(this GameObject gameObject)

Description

Checks if the game object has a component of the specified type.

Type Parameters

TThe type of component to check for.

Parameters

gameObjectThe game object to check for the component.

Returns

boolTrue if the component exists, false otherwise.