docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IAsyncAffordanceStateReceiver

    An interface that represents an affordance receiver that generates asynchronous tween jobs to be scheduled with the job system, then updates the affordance state according to the tween job output.

    Inherited Members
    IAffordanceStateReceiver.currentAffordanceStateData
    IAffordanceStateReceiver.OnAffordanceStateUpdated(AffordanceStateData, AffordanceStateData)
    Namespace: UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    public interface IAsyncAffordanceStateReceiver : IAffordanceStateReceiver

    Methods

    HandleTween(float)

    Called to generate and schedule a tween job with a given tween target.

    Declaration
    JobHandle HandleTween(float tweenTarget)
    Parameters
    Type Name Description
    float tweenTarget

    Tween target parameter for the tween job. Used as a parameter in the theme's animation curve to find the value between the 0-1 animation state in the associated theme.

    Returns
    Type Description
    JobHandle

    Returns JobHandle used by affordance state provider.

    See Also
    ISynchronousAffordanceStateReceiver
    BaseAsyncAffordanceStateReceiver<T>

    UpdateStateFromCompletedJob()

    Read the affordance value written by the last completed affordance job and propagate that to listeners. Called by the affordance state provider to propagate the tween job's output.

    Declaration
    void UpdateStateFromCompletedJob()
    See Also
    ISynchronousAffordanceStateReceiver
    BaseAsyncAffordanceStateReceiver<T>

    See Also

    ISynchronousAffordanceStateReceiver
    BaseAsyncAffordanceStateReceiver<T>
    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)