Make sure owner and avatar implement interfaces in CanTransition
This commit is contained in:
parent
6c06611901
commit
c654bfd8fb
@ -37,6 +37,11 @@ bool UFFState::CanTransition(const FFFStateContext& InStateContext)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UE_LOG(LogTemp, Error, TEXT("CanTransition :: Avatar of FFFStateContext does not implement IFFStateAvatarInterface"));
|
||||
return false;
|
||||
}
|
||||
|
||||
IFFStateOwnerInterface* SOI = Cast<IFFStateOwnerInterface>(InStateContext.Owner);
|
||||
if(SOI)
|
||||
@ -46,6 +51,11 @@ bool UFFState::CanTransition(const FFFStateContext& InStateContext)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UE_LOG(LogTemp, Error, TEXT("CanTransition :: Owner of FFFStateContext does not implement IFFStateOwnerInterface"));
|
||||
return false;
|
||||
}
|
||||
|
||||
return OnCanTransition(InStateContext);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user