Table of Contents

Input Options

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.

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.


Player Inputs (Unity Input Manager)

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) 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.


Control Freak (Mobile Controls)

For more on Control Freak visit their website.

Control Freak 1.x

  1. Import Control Freak to your project.
  2. Switch the input manager on Input Options to Control Freak. You will see a new option: Control Freak Preferences. Unfold it.
  3. Drag one of the 2 presets from 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.
  4. Run the game. The mobile controls will control player 1.

Control Freak 2.0

  1. Import Control Freak 2 to your project.
  2. A pop-up will ask you to update the Input Manager. Proceed with the installation.
  3. Under Plugins\Control-Freak-2\Add-Ons\ click on CF2-UFE.unitypackage and import it to your project.
  4. Switch the input manager on Input Options to Control Freak. You will see a new option: Control Freak Preferences. Unfold it.
  5. Drag one of the presets from UFE\ThirdPartyAssets\Control-Freak-2\Prefabs\ to the Prefab option. Use the Inspector to adjust these files to your liking.

Special Notes


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";
	}
}

< Back to Global Editor