|
SkiaForUnity
|
Provides functionality to play and control Lottie animations in Unity. More...
Public Member Functions | |
| void | LoadAnimation (string json) |
| Loads an animation from a JSON string and prepares it for playback. | |
| void | SetState (string name) |
| Sets the current state of the Lottie animation. | |
| string | GetStateName () |
| Gets the name of the current animation state. | |
| double | GetFps () |
| Gets the frames per second (FPS) of the loaded animation. | |
| double | GetDurations () |
| Gets the total duration of the loaded animation in seconds. | |
| void | PlayAnimation (bool? reset=null) |
| Initiates playback of the loaded animation. | |
Public Attributes | |
| UnityAction< string > | OnAnimationFinished |
Provides functionality to play and control Lottie animations in Unity.
Definition at line 30 of file SkottiePlayer.cs.
| double SkiaSharp.Unity.SkottiePlayer.GetDurations | ( | ) |
Gets the total duration of the loaded animation in seconds.
Definition at line 168 of file SkottiePlayer.cs.
| double SkiaSharp.Unity.SkottiePlayer.GetFps | ( | ) |
Gets the frames per second (FPS) of the loaded animation.
Definition at line 160 of file SkottiePlayer.cs.
| string SkiaSharp.Unity.SkottiePlayer.GetStateName | ( | ) |
Gets the name of the current animation state.
Definition at line 149 of file SkottiePlayer.cs.
| void SkiaSharp.Unity.SkottiePlayer.LoadAnimation | ( | string | json | ) |
Loads an animation from a JSON string and prepares it for playback.
| json | The JSON string containing the animation data. |
Definition at line 114 of file SkottiePlayer.cs.
| void SkiaSharp.Unity.SkottiePlayer.PlayAnimation | ( | bool? | reset = null | ) |
Initiates playback of the loaded animation.
| reset | Whether to reset the animation to the beginning when finished. |
Definition at line 176 of file SkottiePlayer.cs.
| void SkiaSharp.Unity.SkottiePlayer.SetState | ( | string | name | ) |
Sets the current state of the Lottie animation.
| name | The name of the state to set. |
Definition at line 126 of file SkottiePlayer.cs.
| UnityAction<string> SkiaSharp.Unity.SkottiePlayer.OnAnimationFinished |
Definition at line 44 of file SkottiePlayer.cs.