Selection and Deselection

I am working on a Real Time Strategy game and so far its taking shape a bit like Age of Empires, though thats not what I am after. What I am after for selection though is the same. I have basic selection through the use of function OnMouseDown() but I want to be able to deselect the units afterword. Also, I can figure this out after but if you could help, how do you select with a selection box, and with Shift + LeftClick to add to large selections? Any Help would be GREATLY appreciated!!! Thanks!

Well i have an answer for your deselecting. What you could do is cast a ray from your cameras centre and if it hits anything that is not tagged as say PlayerUnits(This would be units and buildings) then deselect the units. I dont know how you have this set up so i dont want to give you an example incase it is way off the mark, I hope this helps you mate and good luck.