You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
This represents UE4/Main @ 17030256 and Dev-PerfTest @ 17029914 [CL 17060422 by aurel cordonnier in ue5-main branch]
21 lines
890 B
C++
21 lines
890 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
#include "AnimCustomInstanceHelper.h"
|
|
|
|
/////////////////////////////////////////////////////
|
|
// FAnimCustomInstanceHelper
|
|
/////////////////////////////////////////////////////
|
|
|
|
|
|
bool FAnimCustomInstanceHelper::ShouldCreateCustomInstancePlayer(const USkeletalMeshComponent* SkeletalMeshComponent)
|
|
{
|
|
const USkeletalMesh* SkeletalMesh = SkeletalMeshComponent->SkeletalMesh;
|
|
const USkeleton* Skeleton = SkeletalMesh ? SkeletalMesh->GetSkeleton() : nullptr;
|
|
|
|
// create proper anim instance to animate
|
|
UAnimInstance* AnimInstance = SkeletalMeshComponent->GetAnimInstance();
|
|
|
|
return (AnimInstance == nullptr || SkeletalMeshComponent->GetAnimationMode() != EAnimationMode::AnimationBlueprint ||
|
|
AnimInstance->GetClass() != SkeletalMeshComponent->AnimClass || !Skeleton || !Skeleton->IsCompatible(AnimInstance->CurrentSkeleton));
|
|
} |