Spawn Actor, replication of exposed on spawn variable values


I think it would be really useful and also expected that Actors which are set to replicate and get spawned on the server, will start with the exposed on spawn variables fed by the server.
Currently clients ignore the Values set on the Server, the desired functionality would be that Actors spawn with the same values as on the Server.

Bump.This would be very useful.

Won’t happen. The vars need to be replicated.

I see a lot of these kind of posts from you, from time to time. You’re not being very helpful. Maybe you should take a step back.

Expected maybe, but this would delay initial replication which is undesired for most use cases. What you could do however is to wait for the initial replication bunch to arrive before you show the actor. You could also implement a similar trick like in Unreal Tournament where you force replication to happen earlier (they do it for Projectiles) and minimize the time your object spends with less than its full state.

Exposed variables are set directly on the CDO, so to me this request doesn’t make much sense…

Lot’s of these threads are usually started out of frustration when the engine doesn’t do something the user thinks it should (and usually, it shouldn’t). Most of the time it’s clear that the poster hasn’t researched it and immediatelly comes here instead.

But, fair enough - here’s a full explanation:

Any property that has to travel to the client has to be replicated - this is the defacto expectation made by the engine. If they only need to travel once, you can use the COND_InitialOnly flag.

Having a new system which replicates all ‘ExposeOnSpawn’ properties by default, increases the cost for everybody.

Hi there, I got a similar problem and maybe you can help me with this.

I have server spawned actors that have physics and collision enabled depending on a boolean that is exposed on spawn. Now I’d need it to be set on all clients to, but it’s not. Setting the replication conditions didn’t change anything.

Is there a way I can get this to work? The problem is when I try setting it over a multicast event (way after the construction) there’s a few different issues which is why exposing them on spawn seems much easier.

Thanks in advance and cheers.

EDIT: nevermind… :rolleyes: of course, the physics should only be simulated on the server, and the location of the object will be replicated, so the clients don’t need the information whatsoever.

Just because I’m interested, is there any way to make an exposed-on-spawn variable available to the clients at construction time?