docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Rewind

    Rewind(TimeIndex)

    Retrieves the time index at the beginning of the interval that the time index passed as argument belongs to.

    Declaration
    public TimeIndex Rewind(TimeIndex timeIndex)
    Parameters
    Type Name Description
    TimeIndex timeIndex

    Time index for which the corresponding interval start time index should be calculated.

    Returns
    Type Description
    TimeIndex
    Remarks

    This method can be used to "loop" time indices.

    [Trait, BurstCompile]
    public struct Loop : Trait
    {
        public void Execute(ref MotionSynthesizer synthesizer)
        {
            synthesizer.Push(synthesizer.Rewind(synthesizer.Time));
        }
    }

    Rewind(SamplingTime)

    Retrieves the time index at the beginning of the interval that the sampling time passed as argument belongs to.

    Declaration
    public TimeIndex Rewind(SamplingTime samplingTime)
    Parameters
    Type Name Description
    SamplingTime samplingTime

    Sampling time for which the corresponding interval start time index should be calculated.

    Returns
    Type Description
    TimeIndex
    Remarks

    This method can be used to "loop" time indices.

    [Trait, BurstCompile]
    public struct Loop : Trait
    {
        public void Execute(ref MotionSynthesizer synthesizer)
        {
            synthesizer.Push(synthesizer.Rewind(synthesizer.Time));
        }
    }
    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)