# Trying to change Variable type in structure but getting error 

**URL:** <https://forums.unrealengine.com/t/trying-to-change-variable-type-in-structure-but-getting-error/2677915>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [November 23, 2025, 10:02pm UTC](https://forums.unrealengine.com/t/trying-to-change-variable-type-in-structure-but-getting-error/2677915 "2025-11-23T22:02:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RaptDept](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RaptDept](https://forums.unrealengine.com/u/RaptDept)\
**Post date:** [November 23, 2025, 10:02pm UTC](https://forums.unrealengine.com/t/trying-to-change-variable-type-in-structure-but-getting-error/2677915/1 "2025-11-23T22:02:42Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [November 23, 2025, 10:54pm UTC](https://forums.unrealengine.com/t/trying-to-change-variable-type-in-structure-but-getting-error/2677915/2 "2025-11-23T22:54:04Z")

</div>

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.
