This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
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
Animations-Related Classes
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
VR-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

API Migration

Major Changes#

Breaking Changes#

Callbacks to Events#

We have reworked the core mechanism of tracking various events everywhere across the Engine, as the callbacks-based system used up to this release had a number of issues and weak points, including:

  • Crashes when subscribing with a class member function in case the subscribed object was deleted (a frequent case as users often forget to unsubscribe).
  • Users had to keep and track all signals and handlers to manually unsubscribe properly.
  • Signal signature unclear from API, without type checking, making it possible to subscribe with virtually any signature, then compile successfully (even with some mistakes), and get invalid data at runtime. No compiler notifications in case of any API changes, again resulting in getting invalid data at runtime.
  • Calls to MakeCallback() and typecasting for lambda expressions were required in order to use addCallback() functions.

Introducing the new Event System to replace old callbacks with improved reliability and flexibility, bringing you the following features:

  • New Events have strict type checking for function signatures. It is now clearly seen how many arguments and which exactly a callback (event handler) function requires.
  • Compile-time checking determines whether argument types match event types or not.
  • Simpler subscription to events with lambda functions. There is no need to perform internal type conversions.
  • The new EventConnection handler does not require to unsubscrube manually. It automatically breaks any connection in the destructor.
  • More flexibility: you can temporarily disable certain events to perform certain actions without triggering them, as well as you can toggle on and off just a particular connection (EventConnection).
  • Batch management: a set of different subscriptions can be linked to a single EventConnections instance, enabling you to unsubscribe from all of them in a single function call.

The new Event System will require manual migration. But, there's nothing to worry about as the entire process involves locating all instances of addCallback in your code and replacing them with the new approach according to the instructions geven below. For a medium-sized project this can be completed by one developer in a few days.

BoundBox Class#

Image Class#

ImageConverter Class#

LightEnvironmentProbe Class#

UNIGINE 2.17 UNIGINE 2.18
setRaymarchingDiffuseReconstructionSamplesScreen( int ) Removed.
getRaymarchingDiffuseReconstructionSamplesScreen( ) Removed.
setRaymarchingDiffuseReconstructionSamplesCubemap( int ) Removed.
getRaymarchingDiffuseReconstructionSamplesCubemap( ) Removed.
setRaymarchingSpecularReconstructionSamplesScreen( int ) Removed.
getRaymarchingSpecularReconstructionSamplesScreen( ) Removed.
setRaymarchingSpecularReconstructionSamplesCubemap( int ) Removed.
getRaymarchingSpecularReconstructionSamplesCubemap( ) Removed.

New Functions

LightVoxelProbe Class#

UNIGINE 2.17 UNIGINE 2.18
setAdditiveBlending( bool ) Removed.
isAdditiveBlending( ) Removed.

New Functions

LightWorld Class#

Material Class#

Materials Class#

UNIGINE 2.17 UNIGINE 2.18
Enum LOADING_MODE Removed.
setLoadingMode( Materials::LOADING_MODE ) Removed.
getLoadingMode( ) Removed.
compileShaders( const Vector< Ptr<Material> > & ) Removed.

New Functions

Node Class#

ObjectMeshSkinned Class#

New Functions

PackageUng Class#

Render Class#

UNIGINE 2.17 UNIGINE 2.18
setLightsInterleaved( bool ) Removed. Use setDirectLightingInterleaved( bool ) instead.
isLightsInterleaved() Removed. Use isDirectLightingInterleaved( ) instead.
setLightsInterleavedCatmullResampling( bool ) Removed. Use setDirectLightingInterleavedCatmullResampling( bool ) instead.
isLightsInterleavedCatmullResampling() Removed. Use isDirectLightingInterleavedCatmullResampling( ) instead.
setLightsInterleavedColorClamping( int ) Removed. Use setDirectLightingInterleavedColorClamping( int ) instead.
getLightsInterleavedColorClamping() Removed. Use getDirectLightingInterleavedColorClamping( ) instead.
setLightsInterleavedSamples( int ) Removed. Use setDirectLightingInterleavedSamples( int ) instead.
getLightsInterleavedSamples() Removed. Use getDirectLightingInterleavedSamples( ) instead.
setDenoiseDenoiseByVelocityThreshold( float ) Removed.
getDenoiseDenoiseByVelocityThreshold() Removed.
createCacheTextures( ) Removed.

New Functions

Renderer Class#

UNIGINE 2.17 UNIGINE 2.18
getTextureLights( ) Removed. Use getTextureIndirectLights( ) or getTextureDirectLights( ) instead.

New Functions

Shader Class#

StructuredBuffer Class#

UNIGINE 2.17 UNIGINE 2.18
bindCompute( int ) Removed. Use the RenderState::setStructuredBuffer() method.
unbindCompute( int ) Removed. Use the RenderState::clearStructuredBuffer() method.
bindControl( int ) Removed. Use the RenderState::setStructuredBuffer() method.
unbindControl( int ) Removed. Use the RenderState::clearStructuredBuffer() method.
bindEvaluate( int ) Removed. Use the RenderState::setStructuredBuffer() method.
unbindEvaluate( int ) Removed. Use the RenderState::clearStructuredBuffer() method.
bindFragment( int ) Removed. Use the RenderState::setStructuredBuffer() method.
unbindFragment( int ) Removed. Use the RenderState::clearStructuredBuffer() method.
bindGeometry( int ) Removed. Use the RenderState::setStructuredBuffer() method.
unbindGeometry( int ) Removed. Use the RenderState::clearStructuredBuffer() method.
bindVertex( int ) Removed. Use the RenderState::setStructuredBuffer() method.
unbindVertex( int ) Removed. Use the RenderState::clearStructuredBuffer() method.

Stream Class#

New Functions

Socket Class#

UNIGINE 2.17 UNIGINE 2.18
Socket( int ) Removed.
Socket( int, int ) Removed.
Socket( int, const char *, int ) Removed.
SOCKET_STREAM Renamed as SOCKET_TYPE_STREAM.
SOCKET_DGRAM Renamed as SOCKET_TYPE_DGRAM.
create( ) Set of arguments changed.
create( ) Set of arguments changed.
create( ) Set of arguments changed.
close( ) Set of arguments changed.

SSLSocket Class#

Texture Class#

UNIGINE 2.17 UNIGINE 2.18
bindCompute( int ) Removed. Use the RenderState::setTexture() method with the BIND_ALL variable as an argument.
bindFragment( int ) Removed. Use the RenderState::setTexture() method with the BIND_FRAGMENT variable as an argument.
bindVertex( int ) Removed. Use the RenderState::setTexture() method with the BIND_ALL variable as an argument.
unbindCompute( int ) Removed. Use the RenderState::clearTexture() method.
unbindFragment( int ) Removed. Use the RenderState::clearTexture() method.
unbindVertex( int ) Removed. Use the RenderState::clearTexture() method.

Visualizer Class#

Viewport Class#

FMODStudio Class#

Last update: 2023-11-30
Build: ()