Hello my name is Pontus and im working on a chesslike game where you have alot of boxes which you can choose to click on and then make different structures/characters appear on that box.
this is what i’ve got right now:
var SelectedObject : GameObject;
function OnMouseDown(){
SelectedObject=this.gameObject;
}
I want all other boxes to get unselected when i click a box, so i can only select one box at a time. I dont really know how to do this, also i just want to use one script for all of my boxes!
Help is very much appreciated!