# Better solution for accessing struct properties?

**URL:** <https://forums.unrealengine.com/t/better-solution-for-accessing-struct-properties/2735689>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [July 14, 2026, 5:32pm UTC](https://forums.unrealengine.com/t/better-solution-for-accessing-struct-properties/2735689 "2026-07-14T17:32:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krileon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Krileon](https://forums.unrealengine.com/u/Krileon)\
**Post date:** [July 14, 2026, 5:32pm UTC](https://forums.unrealengine.com/t/better-solution-for-accessing-struct-properties/2735689/1 "2026-07-14T17:32:31Z")

</div>

Is there a better way to deal with situations like below?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/2/0/d208d8e8fe19a9062d1b09173ec976503035a7ee.png)

I’ve the same big ol’ switch statement for setting the attributes as well. This feels like an absolute mess to deal with. This struct has 68 properties.

The only thing I can think of is completely ditching the struct in favor of a Map\<GameplayTag,Float\>, but that’s a massive overhaul throughout my entire game. So I’d rather find a more elegant solution here.

Accessing Struct properties by name would be ideal, but then that requires FindPropertyByName, which has performance overhead as I understand it.

Any suggestions?

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [July 15, 2026, 4:07am UTC](https://forums.unrealengine.com/t/better-solution-for-accessing-struct-properties/2735689/2 "2026-07-15T04:07:06Z")

</div>

> [@Krileon](#):
>
> The only thing I can think of is completely ditching the struct in favor of a Map\<GameplayTag,Float\>

this i think although to save you future refactoring a Map cant be replicated so maybe an array/fastarray (with a map lookup) and use a struct instead of float incase you decide later to add say modifers etc

even a property iterator by name has the issue typos/renames etc

another option if your game isnt too complex is make each attribute a UObject

---

<div class="post-metadata">

**Author:** ![Krileon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Krileon](https://forums.unrealengine.com/u/Krileon)\
**Post date:** [July 15, 2026, 12:04pm UTC](https://forums.unrealengine.com/t/better-solution-for-accessing-struct-properties/2735689/3 "2026-07-15T12:04:11Z")

</div>

It’s a SP game so I don’t have to worry about replication. I’ve already got the colossal switch statements implemented so I can just leave them as is, but feels wrong in a way lol. It works though so there’s that.

I’ll probably just leave it as is since I can’t find a way to improve the current struct access logic without throwing GetPropertyByName into it and I’d rather not as that has to do a string lookup and comparison on every call.

---

<div class="post-metadata">

**Author:** ![Krileon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Krileon](https://forums.unrealengine.com/u/Krileon)\
**Post date:** [July 27, 2026, 4:15pm UTC](https://forums.unrealengine.com/t/better-solution-for-accessing-struct-properties/2735689/4 "2026-07-27T16:15:29Z")

</div>

Decided to just leave the giant switch statement. I couldn’t find a more performant way to deal with this and while ugly would more or less be no different had I done it in C++. So just going to let things be.
