docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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
    frameIndex

    Frame index relative to the segment start frame at which the marker has been placed.

    segmentIndex

    Denotes the segment this marker has been associated with.

    traitIndex

    Denotes the associated trait.

    See Also

    Binary.Tag
    Binary.Trait
    Query
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)