Páginas

sábado, 24 de enero de 2015

QIM User Manual

QIM User Manual v1.2.1
by
Lara Brothers
(Roman Lara & Humberto Lara)


Fri, 27 Mar 2015
Available in Unity Asset Store.

QIM is the new way in which the different Unity inputs and controllers for your project are defined. You will notice it is very similar to the Unity Input Manager. This is in order for you to adapt easily to QIM.

After trying it, you will have no need for any other.

QIM allows you to keep each input organized in a controller, change the order and delete any input you choose (something the Unity Input Manager cannot do); and if you do not remember the names of the buttons of a gamepad or keyboard or a mouse, QIM provides maps where you can establish them with just one click.


Main toolbar

You will find the main toolbar on the top of the window and it is where the different controls for your project are defined.


The first button “New”, on the left side of the window, will display a menu in which you can choose between 3 options for your controller: Keyboard and Mouse, Generic Joystick and Joystick.


Keyboard and Mouse option: Prepares a controller ready to be loaded with keyboard and mouse button inputs. This option can only be created once. The representing icon is:


Generic Joystick option: Prepares a controller ready to be loaded with generic joystick inputs. This controller works for single-player games with a single joystick, meaning that no matter how many joysticks are connected to the computer, each one will respond for all. This option can only be created once. The representing icon is:


Joystick option: Prepares a controller ready to be loaded with specific joystick inputs. This controller works for multi-player games, meaning that, unlike the generic joystick option, each controller will respond for itself and not for the rest of them. This option can be created up to 11 times (Unity supported amount). The representing icon is:


Moving on, the following button is “+”, which creates the inputs according to the selected controller; meaning that if you choose “joystick 1” and press the “+” button, the new input will be added to that controller.

The controllers

The controllers are items that allow you to keep your inputs organized. They can be selected by using the left click button on the mouse to display the inputs that each one has. The right click button of the mouse also displays a menu where you can do the following:


Copy: Copies all the inputs of that controller.

Paste: Pastes all the previously copied inputs to the controller you right-clicked on. It only works if there is a controller copied in the QIM clipboard.

Fold inputs: Folds all entries to hide their contents.

Deploy inputs: Displays all entries to view their contents.

Remove: Removes the controller.

The inputs

The inputs are items that store the button values, keys or axis organized by name.


When an input is created, it will look as in the above image. It means the following: 

Triangle: displays or hides the input values.

No Name: indicates the input has no name. It is recommended to write something and not leave it with the “No Name” value.


Pincel icon: opens a window in which you can change the input name.


This window allows you to change the input name by writing in the text field. To apply the change, press the “Done” button or “Return” on your keyboard.

The gear icon displays a menu in which you can do the following:


Copy: Copies the input values.

Paste: Pastes all the previously copied inputs. It only works if there is a previously copied input in the QIM clipboard.

Move Up: Moves the input up one position, if it is not the first on the list.

Move Down: Moves the input down one position, if it is not the last on the list.

Finally, the cross icon deletes the input.

Input values

These fields are very similar to the Unity Input Manager. Therefore, it knows mostly everything. Otherwise, here are their meanings: http://docs.unity3d.com/Manual/class-InputManager.html.

However, QIM adds extra functions that help make things easier. 


These extra functions are buttons that are located next to: Negative Button, Positive Button, Alt Negative Button, Alt Positive Button and Axis: Map and Del.

Map: Opens the map window where you can select the field value.

Del (Delete): Removes field value.

The Gravity, Dead and Sensitivity fields also have extra functions.

This selection field´s purpose is to fill the previous field with default or common values.

The map window

Basically, all maps work in the same way. Therefore, we will give you the example of an Xbox 360 controller.


Before choosing a button or axis, we will explain the toolbar options. The “Type” button, on the left, displays a menu with 3 options: Keyboard, Mouse and Joystick.


Keyboard: Changes the current map for the English keyboard map.

Mouse: Changes the current map for the mouse map.

Joystick: Changes the current map for the joystick map.

The following button “Gamepad” is only on the joystick map. This button displays a menu in which you can change the gamepad type. You can choose between: Xbox 360, PS3 and Generic. In the place of the keyboard map, there`s the size button, which displays a menu in which you can change the map`s dimensions: Small, Middle and Great. There`s no button like this for the mouse map. 

Moving on, the following item is the space where the image reads “Generic Joystick : Fire 1 : Positive Button”, the purpose of this text is to remind you which type of controller (Generic Joystick), which input (Fire 1) and to which field (Positive Button) the value will be added to after choosing a button, key or axis on the map.

Finally, there is the “Slow Hotspots” button (which will probably be deleted in the future) displays the map interactive areas. E.g., it displays bluish boxes which show the events on the map. It is possible that they will appear in the correct place due to the type of screen or a processing conflict.

Next is the explanation on now to choose a value for your input field.

To assign a value, all you need to do is left-click in any of the map`s interactive areas. For example, if you left-click on the red button that corresponds to the “B” button on the Xbox 360 gamepad, the “joystick button 1” will be assigned to the Positive Button field. Some interactive areas can have more than one value. Take for example the ones with 2 values, like the “equals” key that delivers the “equals” value with a left-click and delivers the “plus” value with a right-click. There`s also some with 3 values or more, like the Left Analog Joystick and the Right Analog Joystick or the Print key, where the most common value is established with a left-click and the other 2 are established with a menu that is displayed with a right-click.


In the above image, a right-click displayed a menu over the left analog joystick with the “Left Analog X” and “Left Analog Y” options (if you right-click, it would deliver the “joystick button 8” value). However, if you erroneously select between a value for a button or for an axis, QIM will remind you what type of value you need to assign:


and vice versa, if you assign a button in an axis field:


Options / Templates

The options are on the second toolbox, under the main window.


This button displays a menu where you can choose a template and open the About Quim window.

The Templates option has a sub-menu where you can choose a template created by us or by yourself. To do this you will be required to create a controller, as previously explained, and then choose the Templates-> Save option, then a window will appear in which you will write the name that the screen will be saved with, QIM will save it in a file inside the Assets/Quim/Templates folder in the Unity project view (you must refresh to view it). This way you will see it added to the menu list.


To delete a template, just erase it from the Templates folder, the same way as you erase any file from the Unity Editor.

How to save your work and apply the inputs to the Unity Input Manager.

You can save your work by clicking on the File -> Save Scene menu of the Unity editor, this will create a file outside the Asset folder called QuickInputManager.xml, in a folder called QIM; afterwards, QIM will replace the InputManager.asset Unity file.

Important Note: To save the data in QuickInputManager.xml and apply it in InputManager.asset, you will need to be working in a previously saved scene of your project, since the File -> Save Scene As… menu is not detected: therefore, always  save with the File -> Save Scene menu, having a previously saved scene.

How to use the Unity inputs

You can access the same way you do so with Unity:


One thing should be clear: In each of the names on the Specifid Joystick inputs, QIM assigns an extra string with a space (like “J1” or “J2”), followed by the text you wrote: “J1 Turning” for Joystick 1, “J2 Turning” for Joystick 2, etc. as seen in the below image:


This means that in order to access a controller input, the code must look like Input.GetAxis (“J1 Turning”) with a space between the “J1” and “Turning” like “J1[space]Turning”. This is not the same for the Keyboard and Mouse controllers or Generic Joystick controller, in these cases it is normal, as Input.GetAxis(“Turning”).

QIM also supports Unity and Unity Pro, and is compatible with Unity 5:


Have fun!

Available in Unity Asset Store.