-
Notifications
You must be signed in to change notification settings - Fork 86
Getting Started
Cristian Geambasu edited this page Aug 27, 2015
·
12 revisions
- 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 you're using an older Unity version and you import the UI input addon you'll get a bunch of errors that originate in the StandaloneInputModule.cs script. To fix them, in the Project Panel, navigate to InputManager/Addons/UIInputModules/Resources/ui_input_modules, open the correct file for your Unity version, copy it's content and overwrite the content of the StandaloneInputModule.cs.
- 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 TeamUtility.IO.InputManager.
- Go to the Team Utility > Input Manager menu and select Create Input Manager.
- Go to the Team Utility > Input Manager menu and select Open Input Editor. 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.
Note: The names you'll use for the (Alt)Positive and (Alt)Negative keys are not the same as the ones you would use with the default input manager; they are the names of the KeyCode values. The names are case insensitive. For example, instead of 2 you would use Alpha2.
- In order to use the plugin with the new UI introduced in Unity 4.6 you need the UIInputModules addon.
- When you create a new UI canvas make sure you go to the Team Utility > Input Manager menu and select Use Custom Input Module.