Actor reference in struct not getting replicated

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…

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.

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.

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?

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

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.