-
Notifications
You must be signed in to change notification settings - Fork 15
5. Arcade Input
- Utility Script
- Controls (XBOX... now arcade cab)
- Debug scenes
The static class ArcadeInput.cs is meant to provide you with the necessary code to easily interface with the arcade cabinet controls. It provides both keyboard controls and XBOX Series X|S controller controls for testing purposes.
8-way joystick gate
There are two test scenes in the project to help debug input.
Assets/Scenes/debug-arcade-input.unityAssets/Scenes/debug-input.unity
This scene displays the input mapped through ArcadeInput.cs on screen for both players. This is a good scene to use to check how the keyboard controls and/or XBOX Series X|S controller maps to the input class.
A reminder that you can book out XBOX controllers from Mohawk's Equipment Room, though you must first register and wait for someone to confirm your account creation before booking (one-time setup). https://equipmentroom.mohawkcollege.ca/
This scene displays the input native to Unity's default Input Manager before it is handled by Arcadeinput.cs. If the previous scene is not working, this scene is a good sanity check.
First, you must include the ArcadeInput script on any object in your scene for it to work. You need only one instance, and it can be on any object.
Then, in code, you can access input.
// example