Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: rlatndnsxo 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
-
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.