This is my enum:
UENUM(BlueprintType)
enum class EMovement_Gait : uint8
{
None,
EMOVE_Walk,
EMOVE_Run,
EMOVE_Sprint
};
What I’m trying to do is when I set the enum variable in movement component, it will replicate to character owner and client-server. I try to read the source code of UCharacterMovementComponent to see how they replicate MovementMode. But it is difficult for me to understand how to do so. I also tried to write code on this functions :
virtual bool CanCombineWith() const override; virtual void Clear() override; virtual uint8 GetCompressedFlags() const override; virtual void SetMoveFor() override; virtual void PrepMoveFor() override; virtual void UpdateFromCompressedFlags() override;
But I don’t know how to write code on GetCompressedFlags and UpdateFromCompressedFlags by using flags. Is there any other way besides using RCPs?