Description

FGameplayAbilitySpecHandle is a struct that can be replicated by-design to identify a granted GameplayAbility in server-client communication. This works fine with default struct replication using FRepLayout.

There is a usability issue when users include a FGameplayAbilitySpecHandle as a UPROPERTY in another struct if that other struct specifies a custom NetSerialize function. Then, there is no way to invoke the default serialization behavior nor do users have access to read or write the FGameplayAbilitySpecHandle internal Handle value to manually serialize and deserialize it.

A user has requested Epic to introduce a way to serialize FGameplayAbilitySpecHandle explicitly so that it's compatible with being included in a top-level struct that overrides NetSerialize.

Steps to Reproduce
  • Include FGameplayAbilitySpecHandle in another struct
  • Have the other struct implement custom NetSerialize function via TStructOpsTypeTraits
  • Attempt to implement NetSerialize and observe there is no accessible way to invoke serialization on the FGameplayAbilitySpecHandle

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-202768 in the post.

0
Login to Vote

Fixed
ComponentUE - Gameplay - Gameplay Ability System
Affects Versions5.3
Target Fix5.4
Fix Commit30365352
Main Commit30365352
CreatedDec 15, 2023
ResolvedDec 16, 2023
UpdatedMay 1, 2024
View Jira Issue