Complete implementation of Unity backpack function

GameObjects under the Scene panel and the location where the script is mounted:

Main Camera
Directional Light
UI root
 Camera
 Center
  UIWindow_Bag  (UIWindowBag.cs)
   BGParent
    BG_1
    BG_2
   GoodsBox
    Grid
     sprite(+预设体(BagItem.cs)BG(sprite);Color(sprite);Icon(sprite);Num(label))
     sprite
     sprite
     sprite
     sprite
     sprite
     sprite
     sprite
   Coin
    Coin_BG
    Label
   SaleBtn
    BG
    Label
   UIInformation  (UIInformation.cs)
    BG
    Name
     Label
    Color
     Label
    Level
     Label
    Price
     Label
    Message
     Label

The code is as follows: =================

Guess you like

Origin blog.csdn.net/Star_MengMeng/article/details/122899200