UnityEssentials
Small but useful tools and features for Unity
Static Public Member Functions | List of all members
UnityEngine.ComponentExtensions Class Reference

Extensions for Component More...

Collaboration diagram for UnityEngine.ComponentExtensions:
Collaboration graph

Static Public Member Functions

static T GetComponentRequired< T > (this Component self)
 Get a component. Log an error if it is not found. More...
 

Detailed Description

Extensions for Component

Definition at line 7 of file ComponentExtensions.cs.

Member Function Documentation

◆ GetComponentRequired< T >()

static T UnityEngine.ComponentExtensions.GetComponentRequired< T > ( this Component  self)
static

Get a component. Log an error if it is not found.

Template Parameters
TThe type of component to get.
Returns
The component, if found.
Type Constraints
T :Component 

Definition at line 14 of file ComponentExtensions.cs.


The documentation for this class was generated from the following file: