tranek / GASDocumentation

My understanding of Unreal Engine 5's GameplayAbilitySystem plugin with a simple multiplayer sample project.
MIT License
4.26k stars 789 forks source link

TMaps Replication #92

Closed WizardCell closed 1 year ago

WizardCell commented 1 year ago

Hey Dan,

While reading your amazing GAS documentation I was faced by the following sentence:

I recommend using the GameplayTag version over the FName version. This can prevent spelling errors in Blueprint and GameplayTags are more efficient to send over the network when the GameplayEffectSpec replicates than FNames since the TMaps replicate too.

It got me confused because I know for sure that TMaps don't replicate. Here's the proof from the source code:

bool FMapProperty::NetSerializeItem( FArchive& Ar, UPackageMap* Map, void* Data, TArray<uint8> * MetaData ) const
{
    UE_LOG( LogProperty, Error, TEXT( "Replicated TMaps are not supported." ) );
    return 1;
}

Can you please elaborate on what you mean? Maybe even update the GAS documentation if needed?

tranek commented 1 year ago

Good callout, thanks.

TMaps do not replicate. In fact, the SetByCallers don't replicate, only the final modified attribute values do through the FGameplayEffectSpecForRPC class.