- Backpack Management
- Lattice management
- Item Management
- Item Information Management
a simple backpack function, should be divided into 3 parts, namely
Backpack management ,
lattice ,
items . class Inventory -This category is mainly used to manage the entire backpack, including the sorting of items, picking, discarding, and other functions class Inventory_grid -This class is primarily used to store information about the lattice, such as the ID of the item being placed, whether there is an item class Inventory_item -This category is primarily a drag-and-drop feature, and it holds information about the item class Objectsinfo -Information that holds the item, (information about the item stored in XML)The next step is to implement the basic functions of Ugui, such as drag and drop, and then Inventory_item the class to inherit 5 interfaces.Note:using Unityengine.eventsystem;
- Ibeingdraghandler (Onbeingdrag)
- Idraghandler (Ondrag)
- Ienddraghandler (EndDrag)
- Ipointerhandler (Onpointerenter)
- Ipointerexithandler (Onpointerexit)
The source code is then saved.
From for notes (Wiz)
List of attachments
Unity Backpack System (Ugui) Implementation method