AInfo replication problem?

Spawning same actor from C++ and Blueprints. But, when im using blueprints AInfo actor spawn on each client and server. It does not work for c++ some reason, actor spawns only on server and the only way to replicate it at least somehow is to set owner but it still replicates only to server and to one client, but i need this actor on all clients. Any ideas?

By default AInfo is explicitly set to not replicated via bReplicates = false;. So you probably want to set bReplicates = true; in your derived C++ constructor if you aren’t doing that yet. You may also want to set bAlwaysRelevant = true; as well.

If that doesn’t help you may need to show some code of how your spawning looks in blueprint/C++.

2 Likes

I already had bReplicates, otherwise it would not work in blueprints. bAlwaysRelevant helped me out, look like in blueprints i had to pas some position to spawn actor and by default this position was map 0 0 0 point, and that was close enough to all clients to be relevant. So, yea, that helped me, thanks mate!