Icons added to ItemView are deactivated

Lavos

Member
Hi,

I have added an image game object as a child of the ItemView prefab that is used by my inventory grid. However, this image game object is always inactive on game start as if some script logic was deactivating it. Do you know what is going on? What should I do to add an icon to my item view?
 
Did you reference that image anywhere in one of the Item View Module scripts?
I can't think of anything that would deactivate an image if it's not referenced by any script.
Is the image gameobject deactivated or the image component disabled?

Just to be clear you are adding the Image as a child to the Item View prefab (not the Item View Slot)?
Double check the existing Item View prefabs from the UI schemas and/or demo and see how they are setup.
If you were to add a new image to one of them would it be disabled too?
 
You were absolutely right. It was my mistake. The Item slot removes the child object (and I think there is an option to deactivate this functionality) but the item view does not. I was able to solve my issue. Thank you for your help.
 
Top