Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Loading Multiple Action Maps at Once

Discussion in 'Input System' started by sobsurfing, Nov 15, 2023.

  1. sobsurfing

    sobsurfing

    Joined:
    Mar 3, 2017
    Posts:
    14
    Is there a way to have more than one action map active at once, the simplest way would be to just be able to load maps additively instead of only providing a method to switch maps.

    Right now, it seems to me like duplication might be the way to go but would love a cleaner way to do this, thanks!
     
  2. sobsurfing

    sobsurfing

    Joined:
    Mar 3, 2017
    Posts:
    14
    Turns out ActionMaps can be manually disabled or enabled by using something like

    Code (CSharp):
    1. _playerInput.actions.FindActionMap("Global").Enable();
    (or .Disable())