diff --git a/es-core/src/components/LottieAnimComponent.cpp b/es-core/src/components/LottieAnimComponent.cpp index 9f27ed58e..3c25a0b87 100644 --- a/es-core/src/components/LottieAnimComponent.cpp +++ b/es-core/src/components/LottieAnimComponent.cpp @@ -102,7 +102,11 @@ void LottieAnimComponent::setAnimation(const std::string& path) return; } - mAnimation = rlottie::Animation::loadFromFile(mPath); + ResourceData animData {ResourceManager::getInstance().getFileData(mPath)}; + std::string cache; + + mAnimation = rlottie::Animation::loadFromData( + std::string(reinterpret_cast(animData.ptr.get()), animData.length), cache); if (mAnimation == nullptr) { LOG(LogError) << "Couldn't parse Lottie animation file \"" << mPath << "\"";