Answers for "unity how to disable gamecomponent"

C#
0

how to disable all other components in gameobject in unity

foreach (MonoBehaviour component in GetComponents<MonoBehaviour>())
{	
	if (component != this) component.enabled = false;
}
Posted by: Guest on May-20-2021

Code answers related to "unity how to disable gamecomponent"

C# Answers by Framework

Browse Popular Code Answers by Language