docs.unity3d.com
    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
    Syntax
    public interface IAsyncAffordanceStateReceiver : IAffordanceStateReceiver

    Methods

    HandleTween(Single)

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

    Declaration
    JobHandle HandleTween(float tweenTarget)
    Parameters
    Type Name Description
    Single 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.

    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>
    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