Hi everyone,
I’m working on a multiplayer project in Unreal Engine 5, and I’ve run into an issue when trying to replicate a custom UActorComponent
. Here’s the situation:
-
I have a custom actor component that handles some gameplay logic (e.g. inventory or status effects).
-
The component is added to a character class (derived from
ACharacter
) in both Blueprint and C++. -
I’ve set
bReplicates = true
in the constructor, and I’ve also tried settingSetIsReplicatedByDefault(true)
just in case. -
The owning actor (the character) replicates fine, but the component doesn’t seem to replicate its variables or function calls as expected.
What’s the correct way to make sure that custom components replicate properly in multiplayer? Do I need to manually replicate variables using GetLifetimeReplicatedProps
inside the component class, or is there something I’m missing on the actor side?
Any help, examples, or even documentation links would be greatly appreciated!
Thanks in advance.