Skip to content

Getting Started

Cristian Geambasu edited this page Aug 10, 2019 · 12 revisions

The information on this page is also available as a video tutorial.

Unity - Custom Input Manager Setup Tutorial

Importing the plugin

  • Download or clone the repository. The repository contains a Unity project with the plugin and some examples.
  • Open the Unity project, in the Project Panel select the folder named InputManager, right-click on it and select Export Package.
  • Open your game project in Unity and drag the package you just exported to the Project Panel to import it.
  • If your scripts make any calls to the UnityEngine.Input class, you need to open the project in MonoDevelop or Visual Studio and replace all calls to UnityEngine.Input with calls to Luminosity.IO.InputManager.

Creating the input configurations

  • Go to the Luminosity > Input Manager menu and select Create Input Manager.
  • In the inspector press the Input Editor button. The first time you open the Input Editor you will be prompted to overwrite your project's input settings. You can also do it from the File menu of the Input Editor at a later time.
  • Use the options available in the Edit menu of the Input Editor to set up your input configurations.

It is recommended that you have only one Input Manager in your game. Add it in the first scene and enable Dont Destroy On Load in the inspector. You should also enable Ignore Timescale if you pause the game by setting the timescale to zero.

Using the plugin with UI

  • In order to use the plugin with the UI you need the UI Input Module addon.
  • When you create a new UI canvas make sure you go to the Luminosity > Input Manager menu and select Use Custom Input Module. This will replace the built-in input module with a custom one.
  • If you don't use the newest version of Unity you should go to the Luminosity > Input Manager menu, select Set Input Module Version and choose the version that matches your Unity version.
Clone this wiki locally