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
}