Unreal Engine 5 · Blueprint → C++
Get Owner in Unreal Engine 5 C++UE Docs
The Get Owner Blueprint node is AActor::GetOwner in C++. It returns the AActor* that currently owns this actor, or nullptr if the actor has no owner.
Blueprint node & C++ equivalent
AActor* Owner = GetOwner();What does the Get Owner node do?
Get Owner returns the actor that owns the current actor. Ownership is most commonly used for projectiles (owned by the firing pawn), components, and replication, where the owning connection determines what gets replicated to a client.
The owner is set with SetOwner() and read back with GetOwner().
The C++ equivalent
Call AActor* Owner = GetOwner(); to retrieve the owning actor. Because the owner can be null, always check the pointer before dereferencing it: if (AActor* Owner = GetOwner()) { /* use Owner */ }.
If you need the owner as a specific class, combine it with Cast<>: AMyPawn* OwnerPawn = Cast<AMyPawn>(GetOwner());.
When to use it in C++
Use GetOwner to trace responsibility back to the actor that spawned or controls another — for example, attributing damage from a projectile to the player who fired it. For pawns and controllers, prefer GetInstigator or GetInstigatorController when you specifically need the actor responsible for damage credit rather than raw ownership.
Frequently asked questions
What does GetOwner return if an actor has no owner?+
It returns nullptr. Always null-check the result before dereferencing it.
How do I set an actor's owner in C++?+
Call SetOwner(NewOwner) on the actor. This is typically done at spawn time, for example when spawning a projectile owned by the firing pawn.