Author Topic: NGUI Inventory system  (Read 3869 times)

rlatndnsxo

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
NGUI Inventory system
« on: August 21, 2014, 11:12:11 PM »
Hi guys, the Sample inventory system in the ngui file is amazing, and I can't wait to put  it my game. The problem is, I am a newbie at both

scripting and unity engine.. so I am having a hard time. I've used playmaker with NGUI, but this time i plan on utilizing the NGUI example just as the  example

scene. I kinda understand most of the UI and displays, but one thing is that, I've read the scripts and they were very kind and neat, However I've noticed the script Inv Database, and it's role in the whole scene seems huge. Can somebody explain to me how this works, and give me some tips on how to add a new item such as a helmet or body armor

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI Inventory system
« Reply #1 on: August 22, 2014, 03:59:02 AM »
InvDatabase script goes on a prefab. You add new items to it by selecting the prefab and making the changes in the Inspector view.

In the example that comes with NGUI InvDatabase is just on an object in the scene ("ItemDatabase" object). This would be the object you'd save as a prefab. Then every scene that needs your inventory, you just drag and drop this prefab into, and it'll be there ready to be used.