diff --git a/Source/glTFRuntime/Private/glTFRuntimeParserSkeletalMeshes.cpp b/Source/glTFRuntime/Private/glTFRuntimeParserSkeletalMeshes.cpp index 8b8fc473..a64ff03a 100644 --- a/Source/glTFRuntime/Private/glTFRuntimeParserSkeletalMeshes.cpp +++ b/Source/glTFRuntime/Private/glTFRuntimeParserSkeletalMeshes.cpp @@ -1808,6 +1808,10 @@ UAnimSequence* FglTFRuntimeParser::LoadSkeletalAnimation(USkeletalMesh * Skeleta FStructProperty* StructProperty = CastField(UAnimDataModel::StaticClass()->FindPropertyByName(TEXT("FrameRate"))); FFrameRate* FrameRatePtr = StructProperty->ContainerPtrToValuePtr(AnimSequence->GetDataModel()); *FrameRatePtr = FrameRate; +#else + PRAGMA_DISABLE_DEPRECATION_WARNINGS + AnimSequence->SequenceLength = Duration; + PRAGMA_ENABLE_DEPRECATION_WARNINGS #endif #else AnimSequence->SetRawNumberOfFrame(NumFrames); @@ -2067,6 +2071,9 @@ UAnimSequence* FglTFRuntimeParser::LoadSkeletalAnimation(USkeletalMesh * Skeleta #endif #else AnimSequence->CompressedData.CompressedDataStructure = MakeUnique(); +#if ENGINE_MAJOR_VERSION > 4 + AnimSequence->CompressedData.CompressedDataStructure->CompressedNumberOfKeys = NumFrames; +#endif AnimSequence->CompressedData.BoneCompressionCodec = CompressionCodec; AnimSequence->CompressedData.CurveCompressionCodec = NewObject(); AnimSequence->PostLoad();