Struct Binary.Marker
Markers are used to associate a trait to a single animation frame.
Namespace: Unity.Kinematica
Assembly: solution.dll
Syntax
public struct Binary.Marker
Remarks
Markers can be used in a variety of scenarios:
- Narrow the result of a query
- Control behavior of a task
- Execute custom code
Markers are a general purpose tool that allows a custom trait to be associated with a single animation frame. Queries support markers directly by allowing to narrow searches to all frames that come before, after or at a marker of a certain type.
Markers can also be accessed directly given a reference to the runtime asset and therefore tasks can perform any kind of custom processing.
Markers can also be accessed directly given a reference to the runtime asset and therefore tasks can perform any kind of custom processing.
Markers allow for code execution in case a marker has been placed on a frame that the syntheszier samples during playback.
[Trait, BurstCompile]
public struct Loop : Trait
{
public void Execute(ref MotionSynthesizer synthesizer)
{
synthesizer.Push(synthesizer.Rewind(synthesizer.Time));
}
}
Fields
Name | Description |
---|---|
frame |
Frame index relative to the segment start frame at which the marker has been placed. |
segment |
Denotes the segment this marker has been associated with. |
trait |
Denotes the associated trait. |