The DragAndDropAssets module makes it possible to create ScriptableObjects which can be dragged into your scene, instantiating a corresponding behaviour on the object it was dragged onto. A method on the ScriptableObject is called to setup any values of the behaviour.
Within DuskModules, DragAndDropAssets is mainly used by ObjectPooling and ObjectEffects, to make it possible to drag and drop their ScriptableObject based pools and effects onto objects, to automatically setup the correct behaviours.
DragAndDropAssets has no dependencies.
To add this feature to a ScriptableObject, have it implement the IDragObject interface. Don't forget to add in what behaviour script it needs to create.
public class DragDemoAsset : ScriptableObject, IDragObject<DragDemoBehaviour>
This allows you to drag the ScriptableObject onto game objects with a 3D collider in the scene view, and onto game objects within the Hierarchy window. When you do so, the behaviour is created and the SetupComponent(DragDemoBehaviour component) on the ScriptableObject is called. Assign any values you need of the ScriptableObject to the created behaviour here.
It's not possible to drag ScriptableObjects onto the InspectorGUI. There are no editor callbacks or events to hook into to enable this. If you know of a way to achieve this, do let me know!
Don't forget to add using DuskModules.DragAndDropAssets; to any script using the module.