Question by
krisengelhardt · Oct 21, 2017 at 11:07 AM ·
unity 5lists
How would I best display my list as images
Hi guys,
I have a list of type "Buff" on my character controller in which I want their icons to be displayed to the players UI. Whatever buffs are in the list I want their icon to be shown and then removed as the buff ends. Obviously as buffs will be coming and going quite regularly I am looking for something very robust and scalable. I feel like it should be easy but I cannot get my head around this. I am using a grid attached to the player where I plan on instantiating "buff icons" to.
How would I show the icons of the buffs that are currently in my "buffs" list which is a list of Buffs.
For example....
foreach (Buff buff in buffs) {
Instantiate a image based on buff.icon;
}
Comment