docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method OnDisable

    OnDisable()

    Unity calls this automatically when the evaluator becomes disabled. Use this method for any code cleanup. This is also called when the evaluator is disposed or when its filter is destroyed or disabled.

    Declaration
    protected override void OnDisable()
    Overrides
    XRTargetEvaluator.OnDisable()
    Remarks

    When scripts are reloaded after compilation has finished, OnDisable will be called, followed by OnEnable after the evaluator has been loaded.
    OnDisable will only be called if a call to OnEnable() happened before.

    See Also
    enabled
    In This Article
    Back to top
    Copyright © 2023 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)