t | @param type El tipo de Component para recuperar. |
includeInactive | @param includeInactive ¿Los Components inactivos deben ser incluidos en el set encontrado? |
Returns all components of Type type
in the GameObject or any of its parents.
// Disable the spring on all HingeJoints // in this game object and all its parent game objects var hingeJoints : HingeJoint[]; hingeJoints = gameObject.GetComponentsInParent(HingeJoint); for (var joint : HingeJoint in hingeJoints) { joint.useSpring = false; }
// Disable the spring on all HingeJoints // in this game object and all its parent game objects hingeJoints = (HingeJoint[]) gameObject.GetComponentsInParent(typeof(HingeJoint));
foreach (HingeJoint joint in hingeJoints) { joint.useSpring = false; }
includeInactive | @param includeInactive ¿Los Components inactivos deben ser incluidos en el set encontrado? |
Versión genérica. Para más detalles, mira la página de Funciones genéricas.