The Falcon Selection Box is a tool that allows you to quickly and easily add a pointer selection tool like the one in the most popular real time strategy games.
It is cross-platform because it leverages on Unity’s standalone input module by default.
Features
Works for 2D and 3D game objects.
Works on mobile and desktop environments.
Easy to configure as single selection, multi-selection or both.
Easy to setup.
Easy to customize.
Uses Unity’s event system for optimal performance.
Supports click and drag events.
Handles dragging on any 3D or 2D surface.
Easy to access currently selected objects from script.
Greatly improved the GetBoundsScreenCoordinatesMethod to detect the selection independent of the camera rotation or angle.
Moved the selection detection method to the Selectable class. Now each selectable can have a different way of selection. By default Edge and Center are provided.
Added a convenient method for GLBoxSelector to display the bounding boxes used by the system to detect the selection.
Added a new script to easily deselect all objects on click - DeselectAllClickHandler.
Added some code to the DragHandler script to detect if the DeselectAllClickHandler is present. If it is it will synchronize with it.
Added a delegate to detect when all the objects have been deselected.
Updated readme file.
Updated documentation to reflect the version change.
i selected several objects by dragging and i want to add some more objects to first selected objects with pressing shift key
but i have no idea how can i do.
I am currently working on this exact feature. Depends on how you want to implement, but you need to modify the following scripts:
DefaultInputManager.cs
GLBoxSelector.cs
Selector.cs
I plan to release this feature in the next 2 weeks. If you cannot wait please send me an email to falcon.systems0@gmail.com, I can work with you to add this feature to your project.
I’m really liking the system. But currently both mouse buttons are being used for everything. Could the system be altered so we can choose what each mouse button does.
The RTS I’m making uses the left button to select or drag select. Right click on terrain tells selected units to move there. Single click on terrain deselects all. The way Age of Empires 2 works.
But the Falcon Selection Box system deselects all every time I right click to tell a unit to move. Plus right button to dragbox is weird.
Sorry for the delayed response. I am just noticing the forums are not very good at notifying me about replies to the thread.
Yes, you can! There are a few examples that have hardcoded input strings (mostly the keyboard selection).
But the regular select/unselect unit input is tied to the Unity event system. It was also designed this way to support mobile games.
There are a few places where you can customize the click behavior:
ClickHandler is the class that receives unity events and notifies the system of the event.
DefaulInputManager ProcessClickSelectAction is the method that will actually do the selecting.
I am going to take a stab at it this weekend see if I can make it super easy for you to customize that.
PS: feel free to send an email to falcon.systems0@gmail.com, it’s quicker for me to get back to you that way.
There are a few changes coming down the pipe. I am working on updating the tool to work with Unity’s latest input system (although still in beta). I have it working on my personal project but I will be polishing it for an production quality release. Will be adding some examples for it too.
Here is the latest update 1.4
The minimum version for the project has been increased to Unity’s 2018.4 LTS (this is the minimum version I will officially support). I have also tested (and using it on a personal project) on Unity’s latest 2019.3 version.
Added a DefaultSelector in case you do not want to use the GLBoxSelector.
Added support for specifying which button should get the drag handler script (sorry @FractalCore this took so long).
Removed deprecated stuff.
Documentation update will be coming this weekend.
Although I upgraded the asset store version to be 2018.4 LTS the minimum version, I do have working versions of old Unity version. If you really need a version of this package that works with an older version of Unity (earliest is 5.1) please forward me an email and I can set you up.
Feel free to shoot me an email if you run into any issues.
I will be deprecating this asset. When I released it, the plan was to make it part of a much larger component set, mainly to support making RTS games quicker and easier. Time has passed and I have become much more specialized in the Cloud. There are also better tools out there and I like to maintain a high level of quality both in product and support for my customers. I don’t feel the product is at the quality where I want it to be and the cost to get it there is high vs the return.
If you’ve previously purchased this product, I will still provide support to you, but no new feature requests.
That said, I am working on a set of tools in the Cloud to supercharge games. These tools are much much higher quality, at lower cost. I am raising the status quo of my tools and the games using my tools. The idea is to give you enterprise grade software at an indie friendly price.
Email and branding will change but owners of this asset can still email me at falcon.systems0@gmail.com, email is still open and I still check it on a daily basis.