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

GetComponents() 공개 메소드

public GetComponents ( ) : T[]
리턴 T[]
		public T[] GetComponents(){}
		public Component[] GetComponentsInChildren(Type type){}

Same methods

GameObject::GetComponents ( Type type ) : UnityEngine.Component[]

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