Good Day,
I am using the UIDragDropItem script ( 3.6.8 ) and I would like to receive a event when my object is moved to a new parent so I can perform some actions at this point.
The way I have done this is, in UIDragDropItem script in the method OnDragDropRelease (GameObject surface) I have added the following highlighted line
if (container != null)
{
// Container found -- parent this object to the container
mTrans.parent = (container.reparentTarget != null) ? container.reparentTarget : container.transform;
Vector3 pos = mTrans.localPosition;
pos.z = 0f;
mTrans.localPosition = pos;
SendMessage
("OnSubmit",
this.gameObject); <--- New line
}
Would this be something that could be added or is there a way of doing this already that I am missing?
Cheers,