t | El tipo de Component para recuperar. |
includeInactive | Should Components on inactive GameObjects be included in the found set? includeInactive decides which children of the GameObject will be searched. The GameObject that you call GetComponentsInChildren on is always searched regardless. |
Retorna todos los componentes de tipo type
en el GameObject o cualquiera de sus hijo.
using UnityEngine;
public class GetComponentsInChildrenExample : MonoBehaviour { public Component[] hingeJoints;
void Start() { hingeJoints = GetComponentsInChildren<HingeJoint>();
foreach (HingeJoint joint in hingeJoints) joint.useSpring = false; } }
includeInactive | Should Components on inactive GameObjects be included in the found set? includeInactive decides which children of the GameObject will be searched. The GameObject that you call GetComponentsInChildren on is always searched regardless. |
T[] Una lista de los componentes encontrados que coincidan con el tipo especificado.
Generic version of this method.
T[] Una lista de los componentes encontrados que coincidan con el tipo especificado.
Generic version of this method.