docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Create actions in code

    You can manually create and configure actions entirely in code, including assigning the bindings. This also works at runtime in the Player. For example:

    Warning

    It looks like the sample you are looking for does not exist.

    Any action that you create in this way during Play mode doesn't persist in the input action asset after you exit Play mode. This means you can test your application in a realistic manner in the Editor without having to worry about inadvertently modifying the asset.

    In This Article
    Back to top
    Copyright © 2026 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)