Item Icons Suddenly Not Appearing

DrewofDonuts

New member
Icons in the inventory grid and equipment slots were displaying properly, then suddenly not. Instead, they show the Opsive logo until I hover my mouse over them, where they then go blank entirely.. I'm not sure at point they were broke.

I made no changes to the existing categories and Item Definitions before the issue occurred. I'm confident they are configured correctly (I even used the demo scene as a reference to double check). I did set up my item views as shown in the video tutorial, but they were working after that was set up.

I've tried inheriting from the Item Category's Item Definition Attributes as well as overriding the attribute in the Item Definitions.




Category View
1624597711045.png

Item Definition

1624597792362.png

Inventory Grid in Play mode - Armor is Circled. Inspector shows that the item is in the inventory and with a sprite

1624598074006.png

Help would be appreciated!
 
Last edited:
Something looks off in your ItemDefinition Attributes.

Why is your attribute called "CategoryIcon" and not "Icon". "Icon" is the attribute we use to show Items in the ItemViews by default (you can change that name directly in the ItemView prefab if you wish, but it is recommended to use "Icon")

The "CategoryIcon" should be defined as a Category Attribute, not an Item Definition Attribute.

So I would recommend, first rename you Category Icon to Icon and then if you are using the Category Icon, add it as a Category Attribute.

Check your Item Categories, you might have accidentaly added the wrong attribute in the wrong place.
Btw, you cannot have two attributes with the same name with a different type or in a different attribute collection within a familly of Items

I hope that helps
 
This helped!

I removed all the sprite attributes, and followed your naming recommendations. So, is this attribute string dependent in someway?
 
Here you'll find a list of common Attribute names and types that we often use by default in our scripts. Of course none of them are required but we recommend people to use them if they plan to use something similar:
Most of the time you can change the attributes used by going in your ItemView prefabs and modifying the Attribute name fields of the Item View Modules. Example:
1624637429096.png

For the Icon we don't have the option to easily change the name since we use it in other places too. But if you really wanted to you could. I may add the option if people request it.
 
Top