Hi
i am implementing the drag drop functionality for my cricket game where user can able to swap a player from playing 11 team to substitute player and vice-a-verse. I have implemented it as follow.
for playing 11
LeftContainer (uiwiget , drag drop container , drag scroll view,box collider) attached
- Left Scroll View ( uipanel , uiscrollview )
- Grid (uigrid )
On runtime i have added the player prefab (Drag Drop script , uidrag scroll viiew script attached) .
Similarly RightContainer for the substitute player .
Drag and drop is working in my project. But i am trying 2 following functionality.
1. when i select the 2nd position (XYZ) player from the LeftContainer and drag it , and drop it on to 3rd position (PQR) Right substitute player list , then it should swap , 3rd (PQR) player should appear at the 2nd postion of the LeftContainer & 2nd player should be adjusted at 3rd position of the Right Substitute player list container.
Presently it is adding it to the last of the list.
2. When i select a (xyz)object from leftcontainer , and drag it to some object (pqr) of rightcontainer , (pqr) object should give some give auto scale feature(visual feedback) to show that i am the destination object on which you can drop the object(xyz).
Can anybody help me out ?
thanks