3using System.Collections;
20 switch (desc.triggerType)
23 Debug.Log(
"Request " + desc.item.name +
" from " + sourceSheet.name +
" to " + destinationSheet.name);
26 if (desc.permission ==
true)
28 Debug.Log(
"Successful drop " + desc.item.name +
" from " + sourceSheet.name +
" to " + destinationSheet.name);
32 Debug.Log(
"Denied drop " + desc.item.name +
" from " + sourceSheet.name +
" to " + destinationSheet.name);
36 Debug.Log(
"Item " + desc.item.name +
" added into " + destinationSheet.name);
39 Debug.Log(
"Item " + desc.item.name +
" will be destroyed from " + sourceSheet.name);
42 Debug.Log(
"Unknown drag and drop event");
53 foreach (
DragAndDropCell cell
in GetComponentsInChildren<DragAndDropCell>())
71 foreach (
DragAndDropCell cell
in GetComponentsInChildren<DragAndDropCell>())
Every item's cell must contain this script
void AddItem(DragAndDropItem newItem)
Manualy add item into this cell
DragAndDropItem GetItem()
Get item from this cell
void RemoveItem()
Manualy delete item from this cell
Example of control application for drag and drop events handle
void RemoveFirstItem()
Remove item from first not empty cell
void AddItemInFreeCell(DragAndDropItem item)
Add item in first free cell