[Closed] How to replicate components spawned at runtime?
Hi, I'm trying to add components to an actor at runtime and then have them replicate.
The actor's constructor:
And a function that is called on the server:
This works fine in singleplayer, but it causes my clients to disconnect when "block->SetIsReplicated(true);" is called. If I don't call it, my clients will be able to collide with it at the actor's location, but not see it. What would be the proper way to do this?
EDIT: I found the solution on the forum. Closing thread.
The question has been closed Dec 28 '16 at 11:54 AM by AdamBors for the following reason:
Found solution elsewhere, updated OP.
I am not an expert on Component replication, but if it works just like Actors, then you have to just spawn the component on the server, it will replicate automatically to all clients.
answered Dec 06 '16 at 06:25 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here