AActor incompatible with UPrimitiveComponent

UPrimitiveComponent* UPrim = Cast(GetOwner() → GetRootComponent());