Hello People, im new in Unity and maybe its a silly question.I’ve read other threads but i dont find it.
So i have a Button and On click must Destroy Enemy Object. The Script that the Button hat is :
public GameObject Enemy;
public void Matar()
{
Destroy(Enemy.gameObject);
}
}
It does anything when pressed. Enemy is in the Scene and Script is attached to the Button.
Thanks for your Answers!!