So deaktivieren Sie alle anderen Komponenten in GameObject in Einheit
foreach (MonoBehaviour component in GetComponents<MonoBehaviour>())
{
if (component != this) component.enabled = false;
}
foreach (MonoBehaviour component in GetComponents<MonoBehaviour>())
{
if (component != this) component.enabled = false;
}