Struct Binary.Marker | Kinematica | 0.5.0-preview.1
docs.unity3d.com
    Show / Hide Table of Contents

    Struct Binary.Marker

    Markers are used to associate a trait to a single animation frame.

    Namespace: Unity.Kinematica
    Syntax
    public struct 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

    frameIndex

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

    Declaration
    public int frameIndex
    Field Value
    Type Description
    Int32

    segmentIndex

    Denotes the segment this marker has been associated with.

    Declaration
    public Binary.SegmentIndex segmentIndex
    Field Value
    Type Description
    Binary.SegmentIndex

    traitIndex

    Denotes the associated trait.

    Declaration
    public Binary.TraitIndex traitIndex
    Field Value
    Type Description
    Binary.TraitIndex

    See Also

    Binary.Tag
    Binary.Trait
    Query
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023