cara menonaktifkan semua komponen lain di GameObject in Unity

foreach (MonoBehaviour component in GetComponents<MonoBehaviour>())
{	
	if (component != this) component.enabled = false;
}