Method GetRequiredComponentInChildren
- Namespace
- Gamelogic.Extensions
- Assembly
- Gamelogic.Extensions.dll
GetRequiredComponentInChildren<T>()
Gets a component of the given type in one of the children, or fail if no such component is attached to the given component.
public T GetRequiredComponentInChildren<T>() where T : Component
Returns
- T
A component of type T attached to the given component if it exists.
Type Parameters
T
The type of component to get.
Exceptions
- InvalidOperationException
When the no component of the required type exist on any of the given components children.