# How many Variables are too many inside a BP Struct?

**URL:** <https://forums.unrealengine.com/t/how-many-variables-are-too-many-inside-a-bp-struct/2315445>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [February 3, 2025, 3:16am UTC](https://forums.unrealengine.com/t/how-many-variables-are-too-many-inside-a-bp-struct/2315445 "2025-02-03T03:16:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![corekid96](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/corekid96/32/898567_2.png) [@corekid96](https://forums.unrealengine.com/u/corekid96)\
**Post date:** [February 3, 2025, 3:16am UTC](https://forums.unrealengine.com/t/how-many-variables-are-too-many-inside-a-bp-struct/2315445/1 "2025-02-03T03:16:40Z")

</div>

The BP JSON plugin can convert a BP Struct to JSON and I planned to use a struct as sort of a “database” for all my settings values. The struct variables are just basic strings (not nested because unsupported by the JSON plugin).

**Is UE optimized enough to handle 500+ string variables inside a single BP Struct or do I have to separate them into multiple structs by category?**

---

<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:** [February 3, 2025, 10:25am UTC](https://forums.unrealengine.com/t/how-many-variables-are-too-many-inside-a-bp-struct/2315445/2 "2025-02-03T10:25:10Z")

</div>

You will be limited by FString and not variable count. The summed length of the data + quotation marks, commas and curly brackets is really the limit.

Though the longer your string the more calculations will go into parsing / building back and forth between JSON and FString.

> [@Does the FString have a length limit?](https://forums.unrealengine.com/t/does-the-fstring-have-a-length-limit/410298/2):
>
> Ofcourse it does, but i doubt you’ll reach it anytime soon with a normal game. “Len” returns the length as Int32(which is a little flaw in my opinion since length/size can not be smaller than 0). Deriving from it, that it supports the full 31 Bits of the positive space of Int32, you can create a string with up to 2.147.483.647 characters. IIRC a TChar is 1 Byte, this means a FString of roughly 2GB(!). Nothing beyond this is possbile, because otherwhise Int32 will flip to negative value.

Main question is why would you need 500+ variables inside of a single struct? Are you making the right design choices?

Maybe some of this should be split into actors and serialized into a save file?

If you are basically trying to create a database then why not just use one?

You could go the route of a file database via SQLite for something like this (better than datatables because it can be modified at runtime)

Tutorial on using SQLite with Unreal. It’s an external link:

> **[Using SQLite with Unreal | Coding Babble](https://codingbabble.com/posts/using-sqlite-with-unreal/)**
>
> In this post I'll explain how to add SQLite to your Unreal project.

---

<div class="post-metadata">

**Author:** ![Nawrot](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nawrot/32/618260_2.png) [@Nawrot](https://forums.unrealengine.com/u/Nawrot)\
**Post date:** [February 3, 2025, 1:15pm UTC](https://forums.unrealengine.com/t/how-many-variables-are-too-many-inside-a-bp-struct/2315445/3 "2025-02-03T13:15:57Z")

</div>

Consider using data assets. Parse Json into data assets, then load one you want.

---

<div class="post-metadata">

**Author:** ![corekid96](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/corekid96/32/898567_2.png) [@corekid96](https://forums.unrealengine.com/u/corekid96)\
**Post date:** [February 3, 2025, 5:42pm UTC](https://forums.unrealengine.com/t/how-many-variables-are-too-many-inside-a-bp-struct/2315445/4 "2025-02-03T17:42:15Z")

</div>

The JSON plugin only allows conversions from Struct to JSON. UE’s unreliable SaveGame class is the main reason as to why I have to resort to encrypting and saving JSON data to file.

The SQL DB is nice but unless there is a BP plugin. It’s not of much use to a BP-Only user like me.

@Nawrot I’ll look into it. Thanks for the tip.

---

<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:** [February 3, 2025, 6:05pm UTC](https://forums.unrealengine.com/t/how-many-variables-are-too-many-inside-a-bp-struct/2315445/5 "2025-02-03T18:05:58Z")

</div>

Sqlite plugin is by default in the engine plugins.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [March 5, 2025, 6:06pm UTC](https://forums.unrealengine.com/t/how-many-variables-are-too-many-inside-a-bp-struct/2315445/6 "2025-03-05T18:06:36Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
