Changing Color on Touch.

Hello. i have been making a tower defence game on mobile, and i am stuck on how to change the color of the node when it is touched. And then change it back to the original color.

i found a way to change it once but cant seem to find a way to change in back when i touch a different node.

Seems simple but cant get my head to figure it out.

So basically i need to touch the building node change it color to indicate that. that is the node you touched, and if you touch another node the previous one to go back to its original color and the new one to be changed.

Please help :slight_smile:

I would recommend some sort of events system. Events - Unity Learn

Sorry I can’t get more specific than that, I’ve never used events and I don’t know the particulars of your situation but I think this is what you’re looking for! Good luck and merry coding! :smiley:

But the event manager is global so it changes ALL nodes to black, i need to change 1 node and when press another then change the other node but the previous one to go back to the original color.