Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load pngs images inside lottie json #12

Closed
ammariqais opened this issue Jun 19, 2023 · 6 comments
Closed

load pngs images inside lottie json #12

ammariqais opened this issue Jun 19, 2023 · 6 comments

Comments

@ammariqais
Copy link

i have lottie file that included pngs its works fine on lottiefiles.com but not working on unity no error, just empty not loaded the images
lottie file attchemnt
emote satan (1).txt

@toboko
Copy link

toboko commented Jun 22, 2023

I am trying to use in my project this package, and I have to report the same problem. In particular, I am using lottie in json format that contain png images in base64 format. The animation does not start, in fact nothing appears but no error is reported.

@ammariqais
Copy link
Author

also its not render texts

@gindemit
Copy link
Owner

Hello! Thanks for the interest in this plugin.
Under the hood this plugin uses Samsungs rlottie library. As I see the .lottie format support was added 2 weeks ago to rlottie.
Samsung/rlottie#541

The native libraries that are included into the latest release do not contain those changes. I need to rebuild the native libraries for all platforms.
I plan to implement GitHub actions to simplify the process of building the native libraries. Writing the scripts for GitHub actions and making sure everything is working fine will take some time.

@gindemit
Copy link
Owner

Hey @ammariqais, I am affraid the rlottie library does not render text: Samsung/rlottie#544

It means this plugin can render text only if the rlottie library supports that. In case it is not supported by rlottie library, please create an issue in their repository.

@ghost
Copy link

ghost commented Jul 3, 2023

Also tried using lottie file with image both encoded in base 64 and accessed by url, both of them render and animate only vector part of lottie animation, images are rendered as grey pixels
Waiting for this issue to resolve, thanks for your work

@gindemit
Copy link
Owner

Hello @ammariqais!
Sorry for the super long waiting time. Can you please try out the latest changes from the dev branch, or the 0.3.0-dev.112 tag to test out loading images from inside of the rlottie file.

https://github.com/gindemit/unity-rlottie.git?path=/unity/RLottieUnity/Assets/LottiePlugin/#0.3.0-dev.112

It works for me now at least in Unity editor:

image

The reason was the disabled stb_image by default in rlottie library. Right now the stb_image is compiled together with the rest of the native code into the LottiePlugin library.
Putting this line into the CMake file fixed the issue:
set(LOTTIE_MODULE OFF CACHE BOOL "Disable LOTTIE MODULE SUPPORT" FORCE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants