How do I replicate a subobject?
I've been trying to replicate a subobject, but with no luck. I have an item class that looks like this:
How do I make it replicable? When I use UPROPERTY(Replicated) it gives me some unresolved externals errors.
If there is another way to get a subobject from the server without the client ever having any information about that object, please tell me. :)
asked Mar 08 '15 at 11:58 PM in C++ Programming
Sounds like you need to implement GetLifetimeReplicatedProps
You'll need a DOREPLIFETIME for each property you mark as replicated.
There will likely be some other steps to get the object as a whole to replicate, since it's not an AActor. You'll need to override ReplicateSubobjects on whatever object owns a reference to the item.
This would look something like:
Where MyAwesomeItem is the UItemBase object that you want to replicate.
answered Mar 09 '15 at 01:27 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here