Mouse drag out selection

137593-capture.png

I want to be able to drag out a selection using the mouse like this. each cube should be a individual cube.

Here is my code so far which doest work when you drag from right to left or up to down.

Here’s a link that helped me in the past. I now use this method every time I need the feature