Download

UActorComponent vs. UObject - what are the benefits of using UActorComponents over UObjects ?

Do you know any cases when using UActorComponents has some real advantages over a regular UObjects ? I was thinking about it and aparat from some small details, I don’t really see any benefit in using UActorComponents.
Let’s take MovementComponent for example. Exactly same logic could be encapsulated in a regular UObject without any additional (and IMHO unnecessary) level of complexity that comes with UActorComponents.
I see some small advantages in using USceneComponents because they have physical representation which can be seen and adjusted in the editor, but UActorComponents are totaly useless for me.

They are easier to use for multiplayer replication.

They’re just different tools.

If you have a re-usable behavior that easily fits into the “Component” paradigm (You want to add it a variety of actors which may not share some common ancestor beyond AActor, you want it to follow the normal component lifecycle with all the callbacks for BeginPlay/etc, you don’t want to manually replicate the the structure, etc), then using an ActorComponent makes sense.

If you don’t need all that framework, then sure, go for a simple UObject.