This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

API Migration

Major Changes#

Breaking Changes#

Joystick and Gamepad Controls Changes#

Interaction is now implemented using SDL library. Joysticks and gamepads now work on Windows and Linux and support hot-plugging. So, you can connect your joystick or gamepad before or after creating an instance of the corresponding class.

You can now create multiple ControlsJoystick and ControlsGamepad having the same numbers. For both of these devices you can access device type (wheel, throttle, etc.) and model.

The ControlsXPad360 class has transformed into ControlsGamepad class, which is now responsible for all gamepads, so the ControlsSixAxis class has been removed.

The following updates were made to the ControlsGamepad class:

  • Added new device types (wheel, throttle, etc.). See the DEVICE_TYPE_* enum and DeviceType.
  • Added device model types (XBox 360, XBox One, PS3, etc.). See the MODEL_TYPE_* enum and ModelType.
  • Some devices support connection of multiple players (e.g., XBox 360 supports up to four players connected through XBox 360 gamepads). Now you can get this index via PlayerIndex.
  • Methods setLeftMotor() and setRightMotor() were removed. Vibration for low-frequency and high-frequency motors is now managed via the new setVibration() method enabling you to control vibration duration as well.
  • The getName() now returns the user-friendly name of the gamepad, not the name of its type ("GamePad", "Wheel" etc.)

See the details for other affected classes:

AppVarjo Class#

Checksum Class#

Controls Class#

UNIGINE 2.15.1 UNIGINE 2.16
CONTROLS_SIX_AXIS Removed. Use CONTROLS_GAMEPAD instead.
CONTROLS_X_PAD360 Removed. Use CONTROLS_GAMEPAD instead.

New Functions

ControlsJoystick Class#

The following changes were made for this release:

  • Joysticks now support hot-plugging. So, you can connect your joystick before or after create an instance of this class.
  • Added new device types (wheel, throttle, etc.). See the DEVICE_TYPE_* enum and the DeviceType property.
  • Some devices support connection of multiple players (e.g., XBox 360 supports up to four players connected through XBox 360 gamepads). Now you can get this index via the PlayerIndex property.
  • Added an initial value for joystick axes (available via getAxisInitialValue(int) ).
  • Added a new enum for the states of the POV (Point-of-View) switch or DPad (POV_*)
  • Both GuidProduct and GuidInstance were removed. Now you should operate with Guid, Vendor, Product, and ProductVersion. The Guid is created on the basis of vendor and product identifiers and product version number. It enables you to identify device model (Controller XBox One, etc.), however, it will be the same for two identical models.

InputGamePad Class#

Description goes here2

UNIGINE 2.15.1 UNIGINE 2.16
setLeftMotor( float ) Removed. Use setVibration( float, float, float ) instead.
setRightMotor( float ) Removed. Use setVibration( float, float, float ) instead.

New Functions

Last update: 2022-04-26
Build: ()