Skip to main content

RPC Metadata Keys

This page lists the metadata you place on a CrowdyEvent receiver to control routing.

The keys go on the UFUNCTION(meta=(...)) line of your _Implementation function.

UFUNCTION(meta = (CrowdyEvent,
CrowdyRecipient = "SpatialMulticast",
CrowdyDecay = "Exponential_Decay",
CrowdyDistance = "Four_Chunks"))
void FireWeapon_Implementation(int32 Ammo, FVector Direction);
CROWDY_EVENT(FireWeapon)

Keys

Each key and its accepted value, default, and behavior:

KeyValueDefaultNotes
CrowdyEvent(marker, no value)requiredMarks the function as a CrowdyEvent receiver.
CrowdyRecipientan ECrowdyEventRecipient nameSpatialMulticastWho receives the event. See enums.
CrowdyDecayan ECrowdyDecayRate nameNo_DecayDistance falloff. Applies only to SpatialMulticast.
CrowdyDistancean ECrowdyReplicationDistance nameEight_ChunksMaximum range in chunks. Applies only to SpatialMulticast.
CrowdyChannela channel name stringempty (the session channel)The named channel for a Multicast event.
tip

Pass enum values as the short enumerator name in quotes, for example CrowdyRecipient = "OwningClient".

caution

The receiver must be a real UFUNCTION. The CROWDY_EVENT(Name) macro only generates the call site. It cannot emit the UFUNCTION, because UnrealHeaderTool does not expand macros when it scans for reflected functions.

See RPC Events in C++.