Class Animation
Asset that contains an animation spline represented by a set of keyframes, each representing an endpoint of a linear curve.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public class Animation : BinaryAsset
Constructors
Animation()
Properties
Duration
Gets the duration of the animation (in frames).
Declaration
[Unmanaged]
public float Duration { get; }
Property Value
System.Single
|
FramesPerSecond
Gets the amount of the animation frames per second.
Declaration
[Unmanaged]
public float FramesPerSecond { get; }
Property Value
System.Single
|
Info
Gets the animation clip info.
Declaration
[Unmanaged]
public Animation.InfoData Info { get; }
Property Value
Animation.InfoData
|
Length
Gets the length of the animation (in seconds).
Declaration
[Unmanaged]
public float Length { get; }
Property Value
System.Single
|
Methods
LoadTimeline(out Byte[])
Gets the animation as serialized timeline data. Used to show it in Editor.
Declaration
[Unmanaged]
public void LoadTimeline(out byte[] result)
Parameters
System.Byte[]
result
The output timeline data container. Empty if failed to load. |
SaveTimeline(Byte[])
Saves the serialized timeline data to the asset as animation.
Declaration
[Unmanaged]
public bool SaveTimeline(byte[] data)
Parameters
System.Byte[]
data
The timeline data container. |
Returns
System.Boolean
|
Remarks
The cannot be used by virtual assets.