Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Bug Report] TArray not replicated when element Removed

I have a TArray called MyArray that is not being replicated when an element is removed. Honestly not sure why this isn't working as the PlayerArray on GameState is clearly replicating correctly as far as I can tell (and players get removed). I'll investigate how that is done, but I still consider this a bug because the TArray then fails to be matched by clients.

 // Declaration
 UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, ReplicatedUsing = OnRep_MyArray, Category =            UBPlayerState, meta = (AllowPrivateAccess = "true"))
 TArray<AUBPlayerState*> MyArray;

 // GetLifeTimeReplicatedProps

 // Replicated

 // Not replicated
Product Version: Not Selected
more ▼

asked Apr 09 '15 at 11:38 PM in Bug Reports

avatar image

477 34 18 47

avatar image Doug E ♦♦ STAFF Apr 10 '15 at 04:04 PM

Hey Cobryis-

According to the API documentation for TArrays (https://docs.unrealengine.com/latest/INT/API/Runtime/Core/Containers/TArray/index.html) it appears that Remove() will remove all instances of the given parameter in the array. If you are trying to remove only a single element from the array you may want to try RemoveSingle().


Doug Wilson

avatar image Cobryis Apr 10 '15 at 05:21 PM

But my issue isn't trying to remove a single object.. My issue is that the removal of the object isn't replicated. Are you saying RemoveSingle will be replicated?

avatar image Doug E ♦♦ STAFF Apr 22 '15 at 12:40 PM

Hey Cobryis-

Sorry for the misunderstanding. I'm still looking into the state of replication with TArrays and will let you know if this is indeed a bug when I have more information.

avatar image Doug E ♦♦ STAFF Apr 27 '15 at 06:24 PM

Hey Cobryis-

Would it be possible for you to send us a sample project where this issue is occuring? If you're able to upload the project to dropbox you can then send me a private message on the forms with the link to the dropbox.


Doug Wilson

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey Cobryis-

We've not heard from you in a few days, so we are marking this post as resolved for tracking purposes. If you are still having problems with your array replicating properly, please feel free to reopen this post by posting a comment with the additional information requested and we will investigate this issue further.


Doug Wilson

more ▼

answered May 04 '15 at 06:22 PM

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question