GetComponentsTemp
GetComponentsTemp<T>(GameObject)
public static List<T> GetComponentsTemp<T>(this GameObject gameObject) ;
Description
Get a List of components. Since the acquired List instance is shared, it can be used only temporarily.
Type Parameters
Type Parameter Name | Description | Type Constraints |
---|---|---|
T | Component type |
Parameters
Parameter Name | Description |
---|---|
gameObject | GameObject |
Returns
List of components
GetComponentsTemp<T>(Component)
public static List<T> GetComponentsTemp<T>(this Component component) ;
Description
Get a List of components. Since the acquired List instance is shared, it can be used only temporarily.
Type Parameters
Type Parameter Name | Description | Type Constraints |
---|---|---|
T | Component type |
Parameters
Parameter Name | Description |
---|---|
component | Component |
Returns
List of components