UnityEngine.GameObject.GetComponents C# (CSharp) 메소드

GetComponents() 공개 메소드

public GetComponents ( Type type ) : UnityEngine.Component[]
type System.Type
리턴 UnityEngine.Component[]
		public Component[] GetComponents(Type type){}
		public T[] GetComponents(){}

Same methods

GameObject::GetComponents ( ) : T[]

Usage Example

예제 #1
0
    void enablePlayer(GameObject player)
    {
        foreach (MonoBehaviour obj in player.GetComponents<MonoBehaviour>())
            obj.enabled = true;

        foreach (CharacterController obj in player.GetComponents<CharacterController>())
            obj.enabled = true;
    }
All Usage Examples Of UnityEngine.GameObject::GetComponents