GetComponentsTemp

public static List<T> GetComponentsTemp<T>(this GameObject gameObject) ;

Get a List of components. Since the acquired List instance is shared, it can be used only temporarily.

Type Parameter Name Description Type Constraints
T Component type
Parameter Name Description
gameObject GameObject

List of components

public static List<T> GetComponentsTemp<T>(this Component component) ;

Get a List of components. Since the acquired List instance is shared, it can be used only temporarily.

Type Parameter Name Description Type Constraints
T Component type
Parameter Name Description
component Component

List of components