docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method SetActionEnabled

    SetActionEnabled(int, int, bool)

    Set whether or not the action index for the given branch is allowed.

    Declaration
    void SetActionEnabled(int branch, int actionIndex, bool isEnabled)
    Parameters
    Type Name Description
    int branch

    The branch for which the actions will be masked.

    int actionIndex

    Index of the action.

    bool isEnabled

    Whether the action is allowed or not.

    Remarks

    By default, all discrete actions are allowed. If isEnabled is false, the agent will not be able to perform the actions passed as argument at the next decision for the specified action branch. The actionIndex corresponds to the action options the agent will be unable to perform.

    See Agents - Actions for more information on masking actions.

    In This Article
    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