This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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
创建内容
内容优化
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:

ObjectMeshStatic Class#

RenderEnvironmentPreset Class#

Render Class#

UNIGINE 2.15.1 UNIGINE 2.16
setShadowShaftsLength( float ) Removed. Use setScreenSpaceShadowShaftsLength( float ) instead.
getShadowShaftsLength( ) Removed. Use getScreenSpaceShadowShaftsLength( ) instead.
setShadowShaftsExposure( float ) Removed.
getShadowShaftsExposure( ) Removed.
setShadowShafts( bool ) Removed. Use setScreenSpaceShadowShaftsMode( int ) instead.
isShadowShafts( ) Removed. Use getScreenSpaceShadowShaftsMode( int ) instead.
getColorCorrectionCurve( ) Renamed as getColorCorrectionRamp( ).
resetColorCorrectionCurve( ) Renamed as resetColorCorrectionRamp( ).
resetColorCorrectionSaturationCurve( ) Renamed as resetColorCorrectionSaturationRamp( ).

New Functions

RenderState Class#

New Functions

Renderer Class#

Material Class#

Description goes here2

UNIGINE 2.15.1 UNIGINE 2.16
TEXTURE_SOURCE_CURVE Renamed as TEXTURE_SOURCE_RAMP.
WIDGET_TEXTURE_CURVE Renamed as WIDGET_TEXTURE_RAMP.
getTextureCurve( int ) Renamed as getTextureRamp( int ).
getTextureCurveOverride( int ) Renamed as getTextureRampOverride( int ).
isEngine( ) Renamed as isFileEngine( ).
destroyShaders( ) Removed.

New Functions

Decal Class#

Description goes here2

New Functions

Input Class#

Description goes here2

UNIGINE 2.15.1 UNIGINE 2.16
getMouseCoordDelta( ) Removed.
getMouseDelta( ) Set of arguments changed.

New Functions

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.

Widget Class#

New Functions

WidgetCanvas Class#

Description goes here2

New Functions

WidgetTreeBox Class#

Description goes here2

New Functions

Shader Class#

Texture Class#

RenderTarget Class#

Property Class#

New Functions

App Class#

Description goes here2

UNIGINE 2.15.1 UNIGINE 2.16
setButtonPressFunc( int (*func)(int button) ) Removed.
setButtonReleaseFunc( int (*func)(int button) ) Removed.
getKeyName( int ) Removed.
setKeyPressFunc( int (*func)(unsigned int key) ) Removed.
setKeyPressUnicodeFunc( int (*func)(unsigned int key) ) Removed.
setKeyReleaseFunc( int (*func)(unsigned int key) ) Removed.
setKeyState( int, int ) Removed.
getKeyState( int ) Removed.
setMouse( int, int ) Removed.
setMouseAxis( int, int ) Removed.
getMouseAxis( int ) Removed.
setMouseButton( int ) Removed.
getMouseButton( ) Removed.
getMouseButtonName( int ) Removed.
getMouseButtonState( int ) Removed.
getMouseX( ) Removed.
getMouseY( ) Removed.
getName( ) Renamed as getVideoAppName( ).
buttonPress( int ) Removed.
buttonRelease( int ) Removed.
clearKeyState( int ) Removed.
clearMouseAxis( int ) Removed.
clearMouseButtonState( int ) Removed.
keyPress( unsigned int ) Removed.
keyPressUnicode( unsigned int ) Removed.
keyRelease( unsigned int ) Removed.
setExternalWindowFocused( bool ) Removed.
isExternalWindowFocused( ) Removed.

New Functions

LightPlanarProbe Class#

AppVarjo Class#

EditorLogic Class#

Description goes here2

UNIGINE 2.15.1 UNIGINE 2.16
render( const EngineWindowPtr& ) Set of arguments changed.

Plugin Class#

Description goes here2

UNIGINE 2.15.1 UNIGINE 2.16
gui( EngineWindowPtr& ) Set of arguments changed.
render( const EngineWindowPtr& ) Set of arguments changed.

UGUID Class#

Description goes here2

UNIGINE 2.15.1 UNIGINE 2.16
isEmpty( ) Return value type changed.
isValid( ) Return value type changed.

New Functions

Last update: 2022-07-01
Build: ()