Drag and Drop (Spell Bar Example)
Last updated
Last updated
Support us as a GitHub Sponsor and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude. These articles are made possible by our GitHub Sponsors ... become a sponsor today!
This scene demonstrates tags and rules similar to the Drag and Drop (Inventory Exmaple) scene with the only signifigant difference being that the behvaiours are set up to emulate a spell book or ability bar.
Setting up code free drag and drop
Setting up drop containers
Setting up drag items
Using Scriptable Tags to defaine item types and cotrol drop rules
Settting up drop rules on drop containers
How to access the Knowledge Base (where you are now)
How to access the support Discord
How to leave a review ๐
The "Types" and "Filter Types" fields of Drag Item and Drop Container respectivly take Scriptable Objects. That is we use Scriptable Objects as unique identifiers to power our filtering system. This is better than simple strings in that comparing two Scriptable Objects is faster and less error prone than comparing two strings. We use the same system in the Heathen Behaviour to tag behaviours.
You can use any Scriptable Object you would like to represent a type. We have create a simple empty Scriptable Object called a Scriptable Tag which we use in this scene. Scriptable Tag has no long and not data it simply represents a unique referencable identifier.
These are Drag and Drop items configured with types similar to the Items in the Inventory exmaple.
These are Drop Containers configured with Type Filters similar to the slots in the Inventory example.