本文整理汇总了C++中UAnimationAsset::IsA方法的典型用法代码示例。如果您正苦于以下问题:C++ UAnimationAsset::IsA方法的具体用法?C++ UAnimationAsset::IsA怎么用?C++ UAnimationAsset::IsA使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UAnimationAsset
的用法示例。
在下文中一共展示了UAnimationAsset::IsA方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetAssetsNodeHoverMessage
void UAnimationGraphSchema::GetAssetsNodeHoverMessage(const TArray<FAssetData>& Assets, const UEdGraphNode* HoverNode, FString& OutTooltipText, bool& OutOkIcon) const
{
UAnimationAsset* Asset = FAssetData::GetFirstAsset<UAnimationAsset>(Assets);
if ((Asset == NULL) || (HoverNode == NULL))
{
OutTooltipText = TEXT("");
OutOkIcon = false;
return;
}
const UK2Node* PlayerNodeUnderCursor = NULL;
if (Asset->IsA(UAnimSequence::StaticClass()))
{
PlayerNodeUnderCursor = Cast<const UAnimGraphNode_SequencePlayer>(HoverNode);
}
else if (Asset->IsA(UBlendSpace::StaticClass()))
{
UBlendSpace* BlendSpace = CastChecked<UBlendSpace>(Asset);
if (IsAimOffsetBlendSpace(BlendSpace))
{
PlayerNodeUnderCursor = Cast<const UAnimGraphNode_RotationOffsetBlendSpace>(HoverNode);
}
else
{
PlayerNodeUnderCursor = Cast<const UAnimGraphNode_BlendSpacePlayer>(HoverNode);
}
}
// this one only should happen when there is an Anim Blueprint
UAnimBlueprint* AnimBlueprint = Cast<UAnimBlueprint>(FBlueprintEditorUtils::FindBlueprintForNode(HoverNode));
const bool bSkelMatch = (AnimBlueprint != NULL) && (AnimBlueprint->TargetSkeleton == Asset->GetSkeleton());
if (!bSkelMatch)
{
OutOkIcon = false;
OutTooltipText = FString::Printf(TEXT("Skeletons are not compatible"));
}
else if (PlayerNodeUnderCursor != NULL)
{
OutOkIcon = true;
OutTooltipText = FString::Printf(TEXT("Change node to play %s"), *(Asset->GetName()));
}
else
{
OutOkIcon = false;
OutTooltipText = FString::Printf(TEXT("Cannot replace '%s' with a sequence player"), *(HoverNode->GetName()));
}
}