You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a situation where I have to choose between several lottie files at runtime to display. I don't think having several gameobjects in the scene and selecting between those is elegant. Would it be possible to add a "SetLottie" function to the AnimatedImage object?
The text was updated successfully, but these errors were encountered:
Hello @gardyna, thanks a lot for the suggestion! Sorry for the long reply, I was busy on other projects. I will implement the API for this feature in the next versions.
I have a situation where I have to choose between several lottie files at runtime to display. I don't think having several gameobjects in the scene and selecting between those is elegant. Would it be possible to add a "SetLottie" function to the AnimatedImage object?
Hey @gardyna and @JonFaull I just reviewed again the existing implementation.
The AnimatedImage monobeh does has a public method LoadFromAnimationJson()
You can use it on the same AnimatedImage instance to load new animations. It will automatically unload the already loaded animation. No need to dispose it explicitly.
You need to provide at least 3 parameters: string json, uint width, uint height
You can see an example how to use this method on the dev branch in the repo_root/unity/RLottieUnity/Assets/LottiePlugin/Tests/Runtime/src/AnimatedImageTests.cs file
I have a situation where I have to choose between several lottie files at runtime to display. I don't think having several gameobjects in the scene and selecting between those is elegant. Would it be possible to add a "SetLottie" function to the AnimatedImage object?
The text was updated successfully, but these errors were encountered: