# Struct data does not get replicated

**URL:** <https://forums.unrealengine.com/t/struct-data-does-not-get-replicated/2454533>\
**Category:** Multiplayer & Networking\
**Tags:** Struct, Replication, unreal-engine, Multiplayer, Blueprint\
**Created:** [April 13, 2025, 2:18pm UTC](https://forums.unrealengine.com/t/struct-data-does-not-get-replicated/2454533 "2025-04-13T14:18:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xhuljan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xhuljan/32/952209_2.png) [@Xhuljan](https://forums.unrealengine.com/u/Xhuljan)\
**Post date:** [April 13, 2025, 2:18pm UTC](https://forums.unrealengine.com/t/struct-data-does-not-get-replicated/2454533/1 "2025-04-13T14:18:43Z")

</div>

Hello everyone,  
I’m looking for help solving a frustrating issue I’ve been stuck on for a while. Despite trying several approaches, I can’t get it to work as expected.

**TL;DR**

Struct data in `GameState` is not replicating properly to clients — particularly keys that are themselves **nested structs** , even though the parent struct is marked as `Replicated`.

### Context

I’m building a **2D backgammon game** in Unreal Engine. I store the entire game state in a **single custom struct** , which includes:

- Player sides
- Dice results
- Board pile positions
- Whose turn it is
- Other in-game metadata

This struct is stored in the **GameState** , and it’s marked as `Replicated`.

The logic to initialize the board (generate dice, set turn, and populate the board) happens inside the `GameState` and is run **with Server authority**.

### The Problem

- The **listen server** sees all the data correctly.
- The **client** only sees partial data:
  - Dice values and current turn replicate correctly (✅).
  - But **the board state (a nested struct or array of structs) is empty** (❌).

Even though everything is in one struct and that struct is marked as replicated, **some fields never get updated on the client**.

As a test, I converted the entire game state struct to a **JSON string** on the server and fetched it on the client — and it showed the correct, up-to-date data!

But when I access the actual struct variable on the client, it shows only **default values**. This suggests Unreal isn’t recognizing the change to the struct for replication purposes — even though the data is technically valid and exists on the server.

Screenshots:

 ![Screenshot 2025-04-13 160542](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/f/5/5f50bfd8e8415ab35f5eab56084bb96c9cc57f96.png)  
 ![Screenshot 2025-04-13 161600](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/a/2/9a2bd9774af317fb9ebadff056a37bba2e3e17ab.png)  
 ![Screenshot 2025-04-13 161619](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/5/7/557b812b589513af086aaa4782f924a2b80da0f8.png)

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [April 13, 2025, 10:31pm UTC](https://forums.unrealengine.com/t/struct-data-does-not-get-replicated/2454533/2 "2025-04-13T22:31:34Z")

</div>

How are you updating the data?

Game State can only be updated on the server. Widgets cannot make RPC calls. When a client needs to make a change to data it has to RPC the SERVER to make the change.

On Listen server the host client is also the server.

---

<div class="post-metadata">

**Author:** ![Chatouille](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chatouille/32/1194622_2.png) [@Chatouille](https://forums.unrealengine.com/u/Chatouille)\
**Post date:** [April 14, 2025, 9:38am UTC](https://forums.unrealengine.com/t/struct-data-does-not-get-replicated/2454533/3 "2025-04-14T09:38:22Z")

</div>

Looks like you are using TMaps, which afaik still do not support replication.

You can work your way around either by :

- Replacing your Maps with Arrays of structs, including the key in the struct. Then when you need to find items by key you have to iterate the array. It is allegedly less optimal, but in practice iterating an array isn’t really slower than hashing the key, until you reach a certain amount of elements (around 50 according to other posts).

- Move your structs to C++, where you can write custom serialization code to include TMap contents (search for NetSerialize / NetDeltaSerialize). Delta serialization might be difficult to achieve though. If you end up sending the whole map every time, it could impact network performance.

---

<div class="post-metadata">

**Author:** ![DonBusso](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DonBusso](https://forums.unrealengine.com/u/DonBusso)\
**Post date:** [April 14, 2025, 9:46am UTC](https://forums.unrealengine.com/t/struct-data-does-not-get-replicated/2454533/4 "2025-04-14T09:46:59Z")

</div>

@Chatouille

I can confirm that you are not able to replicate Maps and Sets in blueprints. I run into this exact problem few weeks back. I ended up re-thinking my approach and making a couple of arrays and I must say it actually made my blueprint code so much cleaner.

 ![Screenshot 2025-04-14 104642](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/6/8/468935074db0cf8b2dbc3aa7e9dc64161676b91c.png)

---

<div class="post-metadata">

**Author:** ![Xhuljan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xhuljan/32/952209_2.png) [@Xhuljan](https://forums.unrealengine.com/u/Xhuljan)\
**Post date:** [April 15, 2025, 11:43am UTC](https://forums.unrealengine.com/t/struct-data-does-not-get-replicated/2454533/5 "2025-04-15T11:43:20Z")

</div>

Thanks everyone for feedback, its correct, maps variables can not be replicated and i didnt know about that. I will try to structure data in different way

---

<div class="post-metadata">

**Author:** ![Xhuljan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xhuljan/32/952209_2.png) [@Xhuljan](https://forums.unrealengine.com/u/Xhuljan)\
**Post date:** [April 15, 2025, 11:45am UTC](https://forums.unrealengine.com/t/struct-data-does-not-get-replicated/2454533/6 "2025-04-15T11:45:25Z")

</div>

The data are updated from GameState using run on server method but as other mentioned the issue is with map variables which can not be replicated
