Before your game can work you need to link the key from Unity's Input Manager to UFE.
Input Manager: UFE is compatible with 4 different input options.
ProjectSettings
folder.Force Digital Input: If disabled, UFE will apply horizontal forces relative to analog input sensitivity.
Confirm Button: Choose which of the control buttons will be used to confirm options under menus.
Cancel Button: Choose which of the control buttons will be used to cancel/go back under menus.
These values must match with the values under Unity's default Input Manager. If you correctly installed UFE, the inputs registered in the demo file should match with the Input Settings.
Input Type: Select if this input is an Axis or a button.
Axis
set to X Axis.Axis
set to Y Axis.Type
set to Key or Mouse Button.
(Axis) Keyboard Axis Reference: The name of the related Axis
under the Input Manager. Make sure Type
is set to Key or Mouse Button.
(Axis) Joystick Axis Reference: The name of the related Axis
under the Input Manager. Make sure Type
is set to Joystick Axis.
(Button) Input Manager Reference: The name of the related Axis
under the Input Manager. Make sure Type
is set to Key or Mouse Button.
(Image) Axis/Button Icon: The image corresponding to axis direction or button pressed. This is used in debug mode for onscreen display of inputs. For more information check out this article.
For more on Control Freak visit their website.
Control Freak 1.x
Control Freak Preferences
. Unfold it.UFE\ThirdPartyAssets\Control-Freak-1
to the Prefab option: CF-UFE-2Buttons (2 buttons) or CF-UFE-4Buttons (4 buttons). Use the Inspector to adjust these files to your liking.Control Freak 2.0
Plugins\Control-Freak-2\Add-Ons\
click on CF2-UFE.unitypackage
and import it to your project.Control Freak Preferences
. Unfold it.UFE\ThirdPartyAssets\Control-Freak-2\Prefabs\
to the Prefab option. Use the Inspector to adjust these files to your liking.Code access:
UFE.config.player1_Inputs
UFE.config.player2_Inputs
Code example:
// Full code example: .\UFE\Engine\Scripts\Core\UI\Base\CharacterSelectionScript.cs // Change from Keyboard to Joystick foreach (InputReferences inputRef in UFE.config.player1_Inputs){ if (inputRef.inputType == InputType.HorizontalAxis){ if (inputRef.inputButtonName == "P1KeyboardHorizontal") inputRef.inputButtonName = "P1JoystickHorizontal"; }else if (inputRef.inputType == InputType.VerticalAxis){ if (inputRef.inputButtonName == "P1KeyboardVertical") inputRef.inputButtonName = "P1JoystickVertical"; } }