Repnotify for static arrays?

The array replicates fine, but when flagged with “repnotify” doesn’t appear to be triggering ReplicatedEvent() when I update on of its elements.

There are a bunch of hacky workarounds I could do but was wondering if anyone knew if it was possible to trigger repnotify on a static array.

Thanks

When you are trying to get repnotify to work. What netmode are you using?

haven’t tried it myself, but from the info on this page ( https://api.unrealengine.com/udk/Three/ReplicationVariableReplicationNotes.html#Static arrays ) it seems it should work fine. maybe compare the provided code there vs yours?

I had to use the code below to get ReplicatedEvent() to run.

// ReplicatedEvent() won’t get called by net code if we are the server
if(WorldInfo.NetMode == NM_Standalone || WorldInfo.NetMode == NM_ListenServer)
{ ReplicatedEvent(‘YourRepnotifyVar’); }

Thanks for the help guys. In that documentation it states:

This seems a little strange to me. So any time any other repnotify var calls ReplicatedEvent(), this causes all repnotify static arrays to also call ReplicatedEvent(), even if they haven’t changed. Meaning i may be performing unnecessary processing when reacting to a static array ReplicatedEvent() when some unrelated var repnotify.

I also feel I can’t rely simply on a separate bool repnotifying to indicate that an array has changed, as I was under the impression that two vars (that aren’t contained in a single struct) cannot be guaranteed to replicate at the same time.

This means I’m left with needing to perform the same logic on the array in ReplicatedEvent() every time any repnotify var fires. It seems like this feature (repnotify of static arrays) was not fully finished in UDK.