First of all, we download our characters and background resources, because it is mainly a backpack system, so we will not talk about the movement of characters and the construction of scenes here. I will directly provide the source code of the basic project for everyone to use.
Basic project download address:
Link: https://pan.baidu.com/s/1o7_RW_QQ1rrAbDzT69ApRw Extraction code: 8s95
By the way, several 免费
resource packs of unity are used here. If you are interested, you can also download and use them from the unity resource store.
Character resources: Tiny RPG-Forest
backpack ui resources: SIMPLE FANTASY GUI
Item resources: Free Pixel Gear
Import the basic project interface effect
1 Create a new panel object, name it Bag, in the play, set the appropriate width and height, here is 500x400
2. No need for any code, realize pressing × to close the menu interface to
create a new grid layout component (Grid Layout Group )
write code to control if I press the keyboard tab button, open and close the backpack</