I have a game and I must destroy a ball (2D sprite with 2D collider) that bounce if i click on it… I have already tried some solutions find on the net but they doesn’t work.
Just use:
void OnMouseDown() {
destroy(NameOfYourGameobject)
}
I have a game and I must destroy a ball (2D sprite with 2D collider) that bounce if i click on it… I have already tried some solutions find on the net but they doesn’t work.
Just use:
void OnMouseDown() {
destroy(NameOfYourGameobject)
}