It's been a while since my last post about GUI, so here is a little recapitulation on what i have been doing. There is a massive amount of things one can do in GUI., one from the things i learnt is that not everything does have to be in OnGUI() function. Another handy thing to use was a discovering a UnityGUI event which i used instead of Input.GetKeyDown.
Events correspond to user input, or are UnityGUI layout or rendering events. For each event OnGUI
is called in the script; so OnGUI is potentially called multiple times per frame.
Event.current corresponds to "current" event inside OnGUI call.
I have also loaded CSV files into my inventory GUI and used their values to be displayed in Inventory window.There is still a lot of work to do but it's getting to look well i think.
Thanks to Noel items can be now moved from Loot objects into Inventory, which was a problem for so thanks for that. I will discuss Loot script and chest object in a next post.
No comments:
Post a Comment