Method GetInterfaceComponent
- Namespace
- Gamelogic.Extensions
- Assembly
- Gamelogic.Extensions.dll
GetInterfaceComponent<TInterface>(Component)
Gets an attached component that implements the interface of the type parameter.
public static TInterface GetInterfaceComponent<TInterface>(this Component component) where TInterface : class
Parameters
componentComponentThe component to get the interface component from.
Returns
- TInterface
The attached component cast to
TInterface, or null if not found.
Type Parameters
TInterfaceThe interface type to search for.