Hey yall. Im trying to give the "selected" tag to my tile gameobjects when I click on them. The attached script is a child of the tiles. It is supposed to work as follows:
1. Find the previously selected tile.
2. Remove its selected tag(if no previously selected tile exists(this is the first tile that has been selected), skip this step)
3. Apply the selected tag to gameObject we just clicked on.
However, I get an error "Object Reference not set to an instance of an object" when I attempt to run the last line(step 3). Perhaps I am not using the event system properly?Any help will be greatly appreciated