#Drag and Drop
1 messages · Page 1 of 1 (latest)
ok i see
i recommend using ui images for the box so that you can use the IDropHandeler Functions
here is a video that uses ui images for drag and drop
🎁 Support me and DOWNLOAD Unity project: https://www.patreon.com/posts/71698295?s=yt
This tutorial/guide will show you how to create a great full featured drag and drop inventory user interface. You will learn how to drag items on the screen, how to drop them into special slots, how to enable snapping back to original position and finally how t...
later on you can add more functionality like making the slot know if a Pokémon is on it If yes then get its stats and update the party (if it is a party slot) etc.
Good evening, thank you very much for your help, but I'm not managing to switch between them, imagine inside the main grid there are slots and inside the slots there are pokemons, which in this case are images. Basically I just followed the video you sent me and it's working, but in my case it's different from the one in the video, he has empty slots and I don't, they all need to be full so as not to give an error with another script I have.
is there any way I can swap them in case slot1 has a pokemon and slot2 also, I drag the pokemon from slot1 to slot2 and in the hierarchy the pokemon from slot1 and slot2 swap.
Sorry if I'm not being very specific
This is the code that supposedly won't let you pair up the pokemons
This is the main one that does the drag and drop
soory for being late
went on vacation
so acording to me are saying that your "emty slots" are just ocupied by empty ogjects
in that case you can get more data on this method by following his inventory tutourial to see how he implements his systems
other vise you can mabye refactor your code to work with this system
maybe instead of checking of a empty slot you check for a slot with an empty object