# Actor reference in struct not getting replicated

**URL:** <https://forums.unrealengine.com/t/actor-reference-in-struct-not-getting-replicated/322213>\
**Category:** Blueprint\
**Tags:** Struct, Actor-Replication, unreal-engine, bug-report, question, Blueprint\
**Created:** [June 18, 2015, 4:19am UTC](https://forums.unrealengine.com/t/actor-reference-in-struct-not-getting-replicated/322213 "2015-06-18T04:19:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hardballs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hardballs](https://forums.unrealengine.com/u/hardballs)\
**Post date:** [June 18, 2015, 4:19am UTC](https://forums.unrealengine.com/t/actor-reference-in-struct-not-getting-replicated/322213/1 "2015-06-18T04:19:39Z")

</div>

Title says it all. I have a Struct consisting of three variables: an integer, an Actor and a String. The struct in question is set to replicated and the variables are set on the server.

The integer and String get replicated to the clients correctly but the Actor reference always references None, despite the Blueprint that defines this actor being set to true for the Replicates field.

---

<div class="post-metadata">

**Author:** ![hardballs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hardballs](https://forums.unrealengine.com/u/hardballs)\
**Post date:** [June 18, 2015, 4:20am UTC](https://forums.unrealengine.com/t/actor-reference-in-struct-not-getting-replicated/322213/2 "2015-06-18T04:20:35Z")

</div>

I’ve even tried to create my struct in C++ and use it inside my blueprint code, and I still get None for the Actor field in the struct on the clients. I’m pretty sure this is a bug…

---

<div class="post-metadata">

**Author:** ![hardballs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hardballs](https://forums.unrealengine.com/u/hardballs)\
**Post date:** [June 18, 2015, 4:20am UTC](https://forums.unrealengine.com/t/actor-reference-in-struct-not-getting-replicated/322213/3 "2015-06-18T04:20:42Z")

</div>

In fact, it doesn’t even work if I change the Actor typed variable inside my struct to a specific subBP of an Actor (in my case a Actor BP named Bomb) which has it’s replicates field set to true. I tested this to make sure that it wasn’t an inheritance issue with the Replicates field not being picked up from the subclass/subBP.

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [June 18, 2015, 2:12pm UTC](https://forums.unrealengine.com/t/actor-reference-in-struct-not-getting-replicated/322213/4 "2015-06-18T14:12:39Z")

</div>

Hi hardballs,

I just attempted to reproduce this but I couldn’t get your results. The actor var was set and replicated correctly for me.

How are you setting the structs Actor Variable?

Also, since an actor variable can only be set at runtime, is the actor that you are trying to reference contained in the level?

---

<div class="post-metadata">

**Author:** ![zamy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zamy](https://forums.unrealengine.com/u/zamy)\
**Post date:** [June 18, 2015, 2:19pm UTC](https://forums.unrealengine.com/t/actor-reference-in-struct-not-getting-replicated/322213/5 "2015-06-18T14:19:48Z")

</div>

The actor need to be replicated itself. Check if that’s the case.

---

<div class="post-metadata">

**Author:** ![hardballs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hardballs](https://forums.unrealengine.com/u/hardballs)\
**Post date:** [June 18, 2015, 5:27pm UTC](https://forums.unrealengine.com/t/actor-reference-in-struct-not-getting-replicated/322213/6 "2015-06-18T17:27:41Z")

</div>

I have figured out what my problem was. One of my variables was missing some code in Rep\_Notify. Apologies for wasting all of your time.
