Hi guys, in my scene I want to disable some scripts assigned to some GameObjects when I click the “Escape” button. All those GameObjects are tagged “Enemy” and the script that I want to disable is called “Following”. How can I do?
void Update()
{
if(Input.GetKeyDown(KeyCode.Escape))
disable();
}
void disable()
{
}