public T[] GetComponents(){} public Component[] GetComponentsInChildren(Type type){}
void enablePlayer(GameObject player) { foreach (MonoBehaviour obj in player.GetComponents<MonoBehaviour>()) obj.enabled = true; foreach (CharacterController obj in player.GetComponents<CharacterController>()) obj.enabled = true; }