UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
编程
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
应用程序接口
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

API Migration

Major Changes

Breaking Changes#

Ffp Class#

New Functions

Light Class#

LightProj Class#

ObjectParticles Class#

Render Class#

UNIGINE 2.12 UNIGINE 2.13
setColorBrightness() Renamed as setColorCorrectionBrightness().
getColorBrightness() Renamed as getColorCorrectionBrightness().
setColorContrast() Renamed as setColorCorrectionContrast().
getColorContrast() Renamed as getColorCorrectionContrast().
setColorGamma() Renamed as setColorCorrectionGamma().
getColorGamma() Renamed as getColorCorrectionGamma().
setColorSaturation() Renamed as setColorCorrectionSaturation().
getColorSaturation() Renamed as getColorCorrectionSaturation().
setColorTextureImage() Renamed as setColorCorrectionLUTImage().
getColorTextureImage() Renamed as getColorCorrectionLUTImage().
setColorTextureName() Renamed as setColorCorrectionLUTPath().
getColorTextureName() Renamed as getColorCorrectionLUTPath().
setColorWhite() Renamed as setColorCorrectionWhite().
getColorWhite() Renamed as getColorCorrectionWhite().

New Functions

Syncker Plugin#

  • Added an ability to connect additional slaves on the fly (sync_allow_extra_slaves 1) for the synchronous mode (sync_async = 0). However, stable work may require additional effort as channels launched with a significant delay can skip some packets sent from the Master.
  • In case only the Master is present (-sync_count 1) and connection of additional slaves on the fly is enabled (sync_allow_extra_slaves 1) the session shall start immediately and lasts forever (until the Master is on).
  • The setSlavePlayer(slave_index/view_name, player) method now affects only the specified Slave as expected. Synchronization settings for all other Slaves will remain the same and the camera will be automatically changed for them after calling the Game::setPlayer() method on the Master. A crash related to calling the setSlavePlayer() method for a new connected slave was also fixed.
  • Added a new SKIP_FLAGS::SET_PLAYER flag for Slaves to ignore setSlavePlayer() calls by the Master for them.
  • Function call buffering is enabled for Syncker. In case of calling Master::loadNode(), Master::loadNodeReference(), or Master::createNode() methods on the Master these calls are put to a buffer and sent to each new Slave connecting during the active session (sync_allow_extra_slaves 1).
  • Fixed issues with the Master::createNode() method, now it returns a bool value (true - on success).

IG Changes#

Packet IDs#

The sendUserMessage() method now has a packet ID argument, so now you can tell exactly what was sent, unlike in 2.11 and earlier versions. This method can be called from anywhere and at any time, you can subscribe to any packet you want.

Initialization#

Added a new OnIGReady callback - it is used for initialization of various user settings. Since 2.12 you can initialize your settings only when the IG is ready, otherwise Slaves may not receive some data. The best place for initialization of user settings is inside this callback.

Loading Worlds#

The world_load console command doesn’t work now! Do not use the following in your launchers: -console_command "world_load world_name"

It is recommended to specify the ID of the desired database in the autoload_database parameter of the ig_config.xml configuration file instead.

To load the world in case you don’t have a connector available and the default world is not set you can use the following console command: database_load [id]

Working with Cameras#

Cameras in IG are synchronized in a special way. IG now has the following methods to set the desired view for a Slave:

  • void setCurrentView(int view_id);
  • void setSlaveView(int slave_index, int view_id);

A View - is an IG wrapper for the Player, so you can manage a camera via the View only. In case of a multi-channel application the following methods of the View class can be used:

  • copyDefinitionFromPlayer() - to copy projection from a usual camera to the view.
  • copyTransformFromPlayer() - to copy the transformation of a usual camera to the view.

You can also create a dedicated component to copy all camera settings to the view each frame, when necessary.

In the configuration file you can set the desired view for each Slave and specify if it is affected by the Syncker’s projections:

Source code (XML)
<syncker_channels>
	<channel syncker_name="center_view" view_id="0" use_syncker_projection="1"/>
	<channel syncker_name="left_view" view_id="0" use_syncker_projection="1"/>
	<channel syncker_name="ground_cam" view_id="1" use_syncker_projection="0"/>
</syncker_channels>

IG::Entity Class#

UNIGINE 2.11 UNIGINE 2.12
setRate() Removed. Use setVelocity() instead.

New Functions

Last update: 2020-10-02