Version: 2021.2
언어: 한국어
public Component[] GetComponents (Type type);

파라미터

type The type of Component to retrieve.

설명

Returns all components of Type type in the GameObject.

using UnityEngine;

public class Example : MonoBehaviour { void Start() { HingeJoint[] hinges = GetComponents<HingeJoint>(); for (int i = 0; i < hinges.Length; i++) { hinges[i].useSpring = false; } } }

public T[] GetComponents ();

설명

Generic version of this method.