From e1de539eb848d215a682965d459297688c8bd2cc Mon Sep 17 00:00:00 2001 From: rdeioris Date: Mon, 29 Apr 2024 12:29:27 +0200 Subject: [PATCH] fixed ue4 build --- Source/glTFRuntime/Private/glTFRuntimeParser.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/glTFRuntime/Private/glTFRuntimeParser.cpp b/Source/glTFRuntime/Private/glTFRuntimeParser.cpp index 20c09022..2e5e8bb6 100644 --- a/Source/glTFRuntime/Private/glTFRuntimeParser.cpp +++ b/Source/glTFRuntime/Private/glTFRuntimeParser.cpp @@ -17,6 +17,7 @@ #endif #include "Misc/Base64.h" #include "Misc/Compression.h" +#include "Misc/Crc.h" #include "Misc/Paths.h" #include "Interfaces/IPluginManager.h" #if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2 @@ -4856,8 +4857,12 @@ bool FglTFRuntimeParser::GetMorphTargetNames(const int32 MeshIndex, TArray(*EncryptionKey); Password.Empty(); +#if ENGINE_MAJOR_VERSION >= 5 + auto UTF8Conversion = StringCast(*EncryptionKey); +#else + auto UTF8Conversion = StringCast(*EncryptionKey); +#endif Password.Append(reinterpret_cast(UTF8Conversion.Get()), UTF8Conversion.Length()); }