Object Multiplier Script and button

Hey,
I’m making an pollution simulator for a school project and I need help.
I need some kind of script with an on screen controller, kinda like a HUD, that would add or remove multiple objects once button is pressed.

For example, if I pushed the button labeled land pollution, it would display the land pollution around the terrain. If I press it again, it will remove that said pollution.

I need three buttons for this, (Land, Air, and Water).

Can anyone help me or provide a script?

thanks

You need to consider the two differents parts in that problem : The GUI (the visual, the buttons etc) and everything related to your project mechanic (adding / removing pollution). I can only help with the first :

  • Use if( GUI.Button(…) ) to display the button and detect a clic.
  • Toggle a bool when the button is pressed (createPol = !createPol) and modify the pollution accordingly