Page 1 of 1

How To: Set Up New Input System

Posted: Sat Apr 18, 2020 3:23 pm
by Tony Li
The Dialogue System supports Unity's new Input System, which is currently in preview release.

The Dialogue System's new Input System integration works through an optional Dialogue System component called Input Device Manager, which is typically on the Dialogue Manager GameObject. The Input Device Manager component has its own manual in Assets / Plugins / Pixel Crushers / Common / Documentation.

To enable the integration, select Tools > Pixel Crushers > Dialogue System > Welcome Window and tick New Input System.

Here is an example scene:

DS_NewInputSystemExample_2020-03-26.unitypackage

It's a copy of DemoScene1 with just a few changes: it sets up new Input System hotkeys for the first two response buttons (mapped to '1' and '2'), and the conversation starts immediately. To keep the input definitions as simple as possible for the example, I didn't set up input for player movement, so the player can't move around.

By default, the Input Device Manager monitors a list of keycodes to determine what type of device the player is using (mouse, joystick, keyboard, etc.). Since the new Input System does not work on keycodes, remove these elements from the Input Device Manager:

Image

Alternatively, the new Input System integration attempts to map those keycodes to corresponding new input definitions whose names are all lowercase without spaces. So, for example, the keycode "Joystick Button 0" should correspond to a new input definition "joystickbutton0". If you register a new input definition with that name, you can keep the keycode in the list.