GetComponentsInChildren as list code example
Example 1: GetComponentsInChildren to list
List<Collider> collidersToTurnOff = new List<Collider>();
void Awake()
{
GetComponentsInChildren(collidersToTurnOff);
}
Example 2: GetComponent to list
List<Collider> collidersToTurnOff = new List<Collider>();
void Awake()
{
GetComponentsInChildren(collidersToTurnOff);
}