Widget Blueprint[UMG] can not store FInstancedStruct in TMap

Summary

FInstancedStruct as TMap Value will be erased after compiled.

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

UI/Tools

Steps to Reproduce

i tested FInstancedStruct as Value Type and Wrapped into another Struct, use that Struct as Value.

both FinstancedStruct’s value will be erased after compiled.

Expected Result

FInstancedStruct should be stayed and saved as it is designed to be static configurations.

Observed Result

FInstancedStruct’s value are erased after compiled[click compiling]

Platform(s)

Windows11

:hammer_and_wrench: How to Fix or Work Around It:

:repeat_button: Workaround 1: Avoid Using FInstancedStruct in TMap Values

Use regular structs or specific data types instead of FInstancedStruct inside maps, if possible.

:brick: Workaround 2: Don’t Nest Too Deeply

Keep the FInstancedStruct outside of deeply nested structs. Unreal may serialize it better if it’s on the top level.

:test_tube: Workaround 3: Store the Struct Separately

Instead of putting it inside a map, try storing the FInstancedStruct in a regular variable or array, and then reference it using keys or indices.

:lady_beetle: Report the Bug to Epic

If you’re working in Unreal Editor for Fortnite, this could be a bug Epic Games needs to fix. You should report it with your project details.

thank u.

i have searched a lot, and found lots of similar issues posted years ago.

it seems that epic simply has no interest fixing this issue or treating it as a bug.

i can not just simply use a direct struct or sth, i have coded all my project structure depending on FInstancedStruct. it worked well with actors or components. i just want to apply all the logic chain in the same workflow, trying to adapt it with Widget, and found that it is not possible, at least for now.

i’m trying to find another way, which can fit into actors and widgets, so that i can manage all the logic [function call chain] into one single workflow, in this way, i can guarantee that the project will grow bigger and bigger without any heroic changes.

1 Like