概要
GetOuterで取得したUObject*をCastすれば一応型指定の参照をとれるが、
GetTypedOuterというものを見つけたのでメモ。
void UMyComponent::BeginPlay()
{
Super::BeginPlay();
// AActor型のOuterを再帰的に上位のOuterまで検索してくれる
AActor* Owner = GetTypedOuter<AActor>();
if (Owner)
{
UE_LOG(LogTemp, Log, TEXT("Owner Actor is: %s"), *Owner->GetName());
}
}