Unity — How To Swap Action Maps
Aug 22, 2022
Here are two action maps we want to swap:
The Cube action map can change the color of the cube, rotate the cube, and call a DrivingState method, which we will use to enable and disable action maps.
The Driving action map can drive the cube and also has a DrivingState method.
By having the DrivingState method on each action map, we’re able to use that method to switch action maps:
Here’s the entire script:
It’s just that easy.