I couldn't seem to find much on the topic. But I'm trying to figure out a way to program something like this
OnMouseDown()
{
//Draw Square from origin to current point
//On release select all the objects of type "whatever"
}
I have all the logic for selecting setup. But right now I can only select one at a time and would very much like to do group selecting with squares. If anyone could point me in the right direction that would be great! Thanks
This has actually been discussed at least a few times here and/or on the forums; I think if you search for 'rts selection', you should be able to find some useful info.
In any case, the first step is probably to decide what space you want to perform the selection in. For example, you could perform the selection in screen space using a screen-space rectangle and Camera.WorldToScreenPoint(), or you could perform the selection in world space using a picking volume.
Of those two methods, the first would probably be the easiest to get working quickly. (That's assuming there are not so many game objects in the scene that a 'brute force' approach would be unsuitable.)