Skip to main content

BA Replication Array - Replication Info Actor - Events

The Replication Info Actor ('ABA_ReplicationInfo') is the Actor exposing all functions of the underlaying FFastArraySerializer. It can be accessed via its name from the Actor Component or directly spawned as AInfo Actor: You can use the node 'Spawn Actor' and spawn a 'BA Replication Info' Actor - or use the Actor Component and its function 'Add Replication Array'.

Delegate definitions for ABA_ReplicationInfo
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FBA_SingleEntrySignature, FBA_FFA_Object, Entry);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FBA_ArrayCountChange, int32, ArrayCount);
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FBA_ArrayChange);
This page lists all functions exposed to Blueprint from the Replication Info Actor.

Events

Events that are raised when the Replication Array itself is changed through CRUD operations, sorting on getting emptied.

The Replication Arrays are implementations of the 'FFastArraySerializer' struct class with entries of 'FFastArraySerializerItem'.

Example to register an Event - Replication Array added

Event "On Entry Post Replicated Add": Event raised after a newly added entry was replicated. It will return a 'FBA_FFA_Object Entry'

BA Replication Array added

warning

The following examples can be seen in the 'BP_ThirdPersonCharacter_Rep' event graph. The BAInfo variable shown above is set when a Replication Array has been added to the Actor Component (right side, last step). This happens on Server side:

BA Replication Array set as variable

The variable is set as 'RepNotify'. This will automatically create a function OnRep_BAInfo. This function is triggered after the variable has been replicated to the client. It can be used to register events that should happen on the client side. If you try to access that variable prioir of replication on client side, you will get null pointer errors.

BA Replication Array set as variable after RepNotify

All available client side events

With the above mechanism to register client side events, the following events are available in addition to the above example:
  • [On Entry Post Replicated Change]
  • [On Entry Post Replicated Receive]
  • [On Entry Pre Replicated Remove]
  • [On Full Array Change Empty]
  • [On Full Array Change Sort]

BA Replication Array added