Struct TweenComponent | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct TweenComponent

    Data describing an active tween. Created by AddTween<T>(Entity, TypeManager.FieldInfo, T, T, Single, TweenFunc, LoopMode, Boolean, Single)

    Once the tween is created, you can use callbacks in the Watcher module to watch for the current state of the tweening operation.

    You can dynamically change values inside the TweenComponent at any time.

    Namespace: Unity.Tiny.Tweens
    Syntax
    public struct TweenComponent : IComponentData

    Fields

    desc

    Description of the tween, including the non-normalized time.

    Declaration
    public TweenDesc desc
    Field Value
    Type Description
    TweenDesc

    ended

    True if the tween has stopped playing (t>duration).

    Declaration
    public bool ended
    Field Value
    Type Description
    System.Boolean
    Remarks

    Never true if looping is continuous. You can use the Watcher module to watch this, and trigger a callback when the tween is finished playing.

    loopCount

    Number of times the tween has looped. You can use the Watcher module to watch this, and trigger a callback every loop.

    Declaration
    public int loopCount
    Field Value
    Type Description
    System.Int32

    normalizedTweenTime

    Current time of tween, normalized to [0..1] and with tween function applied. Only valid when the tween is running.

    Declaration
    public float normalizedTweenTime
    Field Value
    Type Description
    System.Single

    started

    True if the tween has started playing (t>0) This can be watched using the Watcher module.

    Declaration
    public bool started
    Field Value
    Type Description
    System.Boolean

    target

    Entity target to tween.

    Declaration
    public Entity target
    Field Value
    Type Description
    Entity
    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