How do you replicate a TArray of UObjects
I created an Actor Component with an array of objects derived from UObject. I've setup the UObject to be replicatable on it's own when within the ActorComponent but when I put it into a TArray the game crashes.
My Setup is as follows:
while writing this I just had a thought... I had been looking at the documentation on replicating Dynamic Arrays... Do I absolutely positively HAVE to have each element in the array if I am not using the ReplicationKey function...??... that may be it...
For the answer to this question I wrote out an explaination of Replicating a TArray of Subobjects in the forums
answered Feb 27 '15 at 11:06 PM
Can you elaborate on how the game is crashing? Have you stepped through with the debugger? It's probably a null/invalid pointer in myObjects[i] that's crashing when you access it. Either that or the IsReplicationNeeded() function is crashing (can't see if this is possible without seeing the code).
answered Feb 19 '15 at 09:35 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here