Class ConversionContextExtensions | DOTS Timeline | 0.4.0-preview.5
docs.unity3d.com
    Show / Hide Table of Contents

    Class ConversionContextExtensions

    Extension methods for ConversionContext

    Inheritance
    Object
    ConversionContextExtensions
    Namespace: Unity.Timeline.Hybrid
    Syntax
    public static class ConversionContextExtensions

    Methods

    CreateAnimatedTrackWeightEntity(ConversionContext, TrackAsset, BlobAssetReference<AnimationCurveBlob>)

    Creates an entity that will animate a track weight.

    Declaration
    public static Entity CreateAnimatedTrackWeightEntity(this ConversionContext context, TrackAsset track, BlobAssetReference<AnimationCurveBlob> curve)
    Parameters
    Type Name Description
    ConversionContext context
    TrackAsset track
    BlobAssetReference<AnimationCurveBlob> curve
    Returns
    Type Description
    Entity

    Entity.Null if the track or the curve is not valid

    CreateClipEntity(ConversionContext)

    Create an entity representing a timeline clip

    Declaration
    public static Entity CreateClipEntity(this ConversionContext context)
    Parameters
    Type Name Description
    ConversionContext context
    Returns
    Type Description
    Entity
    Exceptions
    Type Condition
    ArgumentException

    CreateCompositeTimer(ConversionContext)

    Create a composite timer entity using the context TimelineClip values. This requires the context to contain an existing Timer (which can be composite)

    Declaration
    public static ConversionContext CreateCompositeTimer(this ConversionContext context)
    Parameters
    Type Name Description
    ConversionContext context
    Returns
    Type Description
    ConversionContext

    A new entity containing a timer

    Exceptions
    Type Condition
    ArgumentException

    Thrown if no TimelineClip is supplied

    CreateCompositeTimer(ConversionContext, ActiveRange, DiscreteTime, Double, String)

    Create a composite timer using preset values

    Declaration
    public static ConversionContext CreateCompositeTimer(this ConversionContext context, ActiveRange range, DiscreteTime offset, double scale, string name)
    Parameters
    Type Name Description
    ConversionContext context

    The current ConversionContext

    ActiveRange range

    The range, relative to the parent timer, that this timer is active.

    DiscreteTime offset

    The time offset of this timer relative to the parent timer.

    Double scale

    The scale offset of this timer relative to the parent timer.

    String name

    The name of the entity.

    Returns
    Type Description
    ConversionContext
    Exceptions
    Type Condition
    ArgumentException

    Thrown if the conversion context does not contain the required values for creating a composite timer

    CreateEntity(ConversionContext, String)

    Create an Entity, binding it to the target conversion object

    Declaration
    public static Entity CreateEntity(this ConversionContext context, string name = null)
    Parameters
    Type Name Description
    ConversionContext context
    String name
    Returns
    Type Description
    Entity
    Exceptions
    Type Condition
    ArgumentException

    CreateTrackEntity(ConversionContext)

    Creates an entity for the track. This is used to provide an active range for any prefabs that are spawned on the tracks. Creates a tag, that is active while the corresponding timer is active

    Declaration
    public static Entity CreateTrackEntity(this ConversionContext context)
    Parameters
    Type Name Description
    ConversionContext context
    Returns
    Type Description
    Entity
    Exceptions
    Type Condition
    ArgumentException

    CreateUnboundClipEntity(ConversionContext, TimelineClip)

    Creates an entity representing a timeline clip, but ignores extrapolation options

    Declaration
    public static Entity CreateUnboundClipEntity(this ConversionContext context, TimelineClip clip)
    Parameters
    Type Name Description
    ConversionContext context
    TimelineClip clip
    Returns
    Type Description
    Entity

    GetTrackPriority(ConversionContext)

    Get the current track priority

    Declaration
    public static int GetTrackPriority(this ConversionContext context)
    Parameters
    Type Name Description
    ConversionContext context
    Returns
    Type Description
    Int32
    Remarks

    This assumes conversion will be applied in depth first order, and that the priority tracker has been property allocated

    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