docs.unity3d.com
    Show / Hide Table of Contents

    Interface IXRTargetEvaluatorLinkable

    An interface that an XRTargetFilter can implement to receive calls whenever an Interactor links to or unlinks from its filter.
    Implement this interface if the evaluator needs to subscribe to events or cache data from the linked Interactors.

    Namespace: UnityEngine.XR.Interaction.Toolkit.Filtering
    Syntax
    public interface IXRTargetEvaluatorLinkable

    Methods

    OnLink(IXRInteractor)

    Called by the Target Filter when it links to the given Interactor. This is also called after the evaluator's Awake() for each already linked Interactor.
    Use this only for code initialization for the given Interactor.

    Declaration
    void OnLink(IXRInteractor interactor)
    Parameters
    Type Name Description
    IXRInteractor interactor

    The Interactor being linked to the filter.

    Remarks

    This is called even if the evaluator is disabled. You can check if the evaluator is enabled using the enabled property.
    You should not update the linked interactor list or the evaluator list in the filter, nor should you disable or enable evaluators. This can lead to out-of-order calls to OnLink(IXRInteractor) and OnUnlink(IXRInteractor).

    See Also
    OnUnlink(IXRInteractor)
    Link(IXRInteractor)

    OnUnlink(IXRInteractor)

    Called by the Target Filter when it unlinks from the given Interactor. This is also called before the evaluator's OnDispose() for each linked Interactor.
    Use this for any code cleanup for the given Interactor.

    Declaration
    void OnUnlink(IXRInteractor interactor)
    Parameters
    Type Name Description
    IXRInteractor interactor

    The Interactor being unlinked from this filter.

    Remarks

    This is called even if the evaluator is disabled. You can check if the evaluator is enabled using the enabled property.
    You should not update the linked interactor list or the evaluator list in the filter, nor should you disable or enable evaluators. This can lead to out-of-order calls to OnLink(IXRInteractor) and OnUnlink(IXRInteractor).

    See Also
    OnLink(IXRInteractor)
    Unlink(IXRInteractor)

    See Also

    XRLastSelectedEvaluator
    XRTargetEvaluator
    XRTargetFilter
    Back to top
    Terms of use
    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