Trying to change Variable type in structure but getting error

I am building an inventory and a pick up input. I’m drawing a sphere to debug. I have my inventory set up but when building my Item Structure in a BP Structure, I have a Thumbnail (texture2d) and a mesh (staticmesh) variable but when I try and change them to an Object reference I get an error saying that ‘Variable type change failed (the selected type may not be compatible with the struct) Check the Log

Can’t find anything in the log about it. Is this a known issue? am I being a bit thick?

You don’t want to hold the item reference directly in the inventory. Put a soft reference to the blueprint’s class and maybe serialize out any extra information specific to that instance (you could hold it in a json string if needed).

Then when you want to take the object out of the inventory, just spawn the actor based on the class and refill it with the extra info.

1 Like