This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Programming
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
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
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

engine.syncker Functions

Warning
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScipt (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.
Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Sim SDK edition to use it.
Notice
Syncker plugin must be loaded.

This class represents Syncker manager interface used to initialize and destroy Syncker in master and slave applications.

Manager Class

Members


int engine.syncker.getArgIsMaster ( ) #

Returns a value indicating if the command line argument "-sync_master" equals to 1.

Return value

true if the command line argument "-sync_master" equals to 1; otherwise, false.

int engine.syncker.getArgUdpPort ( ) #

Returns the UDP port value set by the command line argument "-sync_port".

Return value

UDP port number. The default value is 8890.

int engine.syncker.getArgAddressingMethod ( ) #

Returns the addressing mode value set by the command line argument "-sync_method".

Return value

Current addressing mode: one of the following values: SYNCKER_MULTICAST, SYNCKER_UNICAST, SYNCKER_BROADCAST.

int engine.syncker.getArgIsAsyncMode ( ) #

Returns a value indicating if asynchronous mode is enabled (the command line argument "-sync_async" equals to 1).

Return value

1 if asynchronous mode is enabled; otherwise, 0.

int engine.syncker.getArgPeersCount ( ) #

Returns the number of peers set by the command line argument "-sync_count".

Return value

Number of peers. The default value is 1. The number of peers includes all Slaves in the network + the Master.

string engine.syncker.getArgBroadcastAddress ( ) #

Returns the broadcast address of the Master set by the command line argument "-sync_broadcast_address".

Return value

Broadcast address of the Master.

string engine.syncker.getArgMulticastAddress ( ) #

Returns the multicast address of the Master set by the command line argument "-sync_multicast_address".

Return value

Multicast address of the Master. The default value is 239.0.0.1

string engine.syncker.getArgMasterAddress ( ) #

Returns the IP address of the Master set by the command line argument "-sync_master_address".
Notice
Available for Slave only.

Return value

IP address of the Master.

int engine.syncker.getArgUdpSlavePort ( ) #

Returns the UDP port used by the Slave set by the command line argument "-sync_slave_port".
Notice
Available for Slave only.

Return value

UDP port used by the Slave. The default value is 0 (any unused port available).

int engine.syncker.getArgAllowExtraSlaves ( ) #

Returns the value indicating if additional Slaves can be connected after starting the session set by the command line argument "-sync_allow_extra_slaves".
Notice
Available for Slave only.

Return value

1 if additional Slaves can be connected after starting the session; otherwise, 0.

Master engine.syncker.initMaster ( ) #

Initializes the Syncker as the Master application using values specified via the command-line arguments.

Return value

Master interface instance.

Master engine.syncker.initMasterBroadcast ( int async_mode, int peers_count, string broadcast_address, int udp_port ) #

Initializes the Syncker as the Master application with the broadcast mode enabled.
Notice

Arguments

  • int async_mode - Async mode flag. Set 1 to use asynchronous mode; 0 - to use synchronous mode.Similar to specifying the -sync_async command-line argument.
    Notice
    Slaves must use the same synchronization mode as the Master.
  • int peers_count - Total number of Syncker hosts in the network (including the Master itself). Similar to specifying the -sync_count command-line argument.
  • string broadcast_address - Broadcast address to be used. Similar to specifying the -sync_broadcast_address command-line argument.
  • int udp_port - Broadcast address to be used. Similar to specifying the -sync_broadcast_address command-line argument.

Return value

Master interface instance.

Master engine.syncker.initMasterMulticast ( int async_mode, int peers_count, string multicast_address, int udp_port ) #

Initializes the Syncker as the Master application with the multicast mode enabled.

Arguments

  • int async_mode - Async mode flag. Set 1 to use asynchronous mode; 0 - to use synchronous mode.Similar to specifying the -sync_async command-line argument.
    Notice
    Slaves must use the same synchronization mode as the Master.
  • int peers_count - Total number of Syncker hosts in the network (including the Master itself). Similar to specifying the -sync_count command-line argument.
  • string multicast_address - Multicast address to be used. Similar to specifying the -sync_multicast_address command-line argument.
  • int udp_port - UDP port to be used. Similar to specifying the -sync_port command-line argument.

Return value

Master interface instance.

Master engine.syncker.initMasterUnicast ( int async_mode, int peers_count, int udp_port ) #

Initializes the Syncker as the Master application with the broadcast mode enabled.
Notice

Arguments

  • int async_mode - Async mode flag. Set 1 to use asynchronous mode; 0 - to use synchronous mode.Similar to specifying the -sync_async command-line argument.
    Notice
    Slaves must use the same synchronization mode as the Master.
  • int peers_count - Total number of Syncker hosts in the network (including the Master itself). Similar to specifying the -sync_count command-line argument.
  • int udp_port - UDP port to be used. Similar to specifying the -sync_port command-line argument.

Return value

Master interface instance.

int engine.syncker.isMasterInitialized ( ) #

Returns a value indicating if the Master was initialized.

Return value

1 if the Master was initialized; otherwise, 0.

Master engine.syncker.getMaster ( ) #

Returns the master interface.

Return value

Master interface instance.

Slave engine.syncker.initSlave ( ) #

Initializes the Syncker as the Slave application using values specified via the command-line arguments.

Return value

Slave interface instance.

int engine.syncker.isSlaveInitialized ( ) #

Returns a value indicating if the slave was initialized.

Return value

1 if the slave was initialized; otherwise, 0.

Slave engine.syncker.getSlave ( ) #

Returns the Slave interface.

Return value

Slave interface instance.

int engine.syncker.isSynckerInitialized ( ) #

Returns a value indicating if the Syncker (Master or Slave) was initialized.

Return value

1 if the Syncker (master or slave) was initialized; otherwise, 0.

Syncker engine.syncker.getSyncker ( ) #

Returns the syncker interface.

Return value

Syncker interface instance.

void engine.syncker.setDebugWindow ( int window ) #

Sets a value indicating if the Syncker's debug window is open.

Arguments

  • int window - Enable flag. Use 1 to show the debug window, or 0 - to hide it.

int engine.syncker.isDebugWindow ( ) #

Returns a value indicating if the Syncker's debug window is enabled.

Return value

1 if the Syncker's debug window is enabled; otherwise, 0.

void engine.syncker.destroySyncker ( ) #

Performs shutdown and destroys the Syncker.
Notice
Called automatically, when the plugin is unloaded.

Slave engine.syncker.initSlaveBroadcast ( int async_mode, int udp_port ) #

Initializes the Syncker as the Slave application with the broadcast mode enabled. Master's IP address will be detected automatically.
Notice
Master must be initialized with broadcast mode enabled as well.

Arguments

  • int async_mode - Async mode flag. Set 1 to use asynchronous mode; 0 - to use synchronous mode.Similar to specifying the -sync_async command-line argument.
    Notice
    Slaves must use the same synchronization mode as the Master.
  • int udp_port - UDP port to be used. Similar to specifying the -sync_port command-line argument.

Return value

Slave interface instance.

Slave engine.syncker.initSlaveBroadcast ( int async_mode, string master_address, int udp_port ) #

Initializes the Syncker as the Slave application with the specified parameters and the broadcast mode enabled. Master's IP address is specified explicitly.
Notice
Master must be initialized with broadcast mode enabled as well.

Arguments

  • int async_mode - Async mode flag. Set 1 to use asynchronous mode; 0 - to use synchronous mode.Similar to specifying the -sync_async command-line argument.
    Notice
    Slaves must use the same synchronization mode as the Master.
  • string master_address - Master IP address to be used. Similar to specifying the -sync_master_address command-line argument.
  • int udp_port - UDP port to be used. Similar to specifying the -sync_port command-line argument.

Return value

Slave interface instance.

Slave engine.syncker.initSlaveMulticast ( int async_mode, string multicast_address, int udp_port ) #

Initializes the Syncker as the Slave application with the specified parameters and the multicast mode enabled. Master's IP address will be detected automatically.
Notice
Master must be initialized with broadcast mode enabled as well.

Arguments

  • int async_mode - Async mode flag. Set 1 to use asynchronous mode; 0 - to use synchronous mode.Similar to specifying the -sync_async command-line argument.
    Notice
    Slaves must use the same synchronization mode as the Master.
  • string multicast_address - Multicast address to be used. Similar to specifying the -sync_multicast_address command-line argument.
  • int udp_port - UDP port to be used. Similar to specifying the -sync_port command-line argument.

Return value

Slave interface instance.

Slave engine.syncker.initSlaveMulticast ( int async_mode, string master_address, string multicast_address, int udp_port ) #

Initializes the Syncker as the Slave application with the specified parameters and the multicast mode enabled. Master's IP address is specified explicitly.
Notice
Master must be initialized with broadcast mode enabled as well.

Arguments

  • int async_mode - Async mode flag. Set 1 to use asynchronous mode; 0 - to use synchronous mode.Similar to specifying the -sync_async command-line argument.
    Notice
    Slaves must use the same synchronization mode as the Master.
  • string master_address - Master IP address to be used. Similar to specifying the -sync_master_address command-line argument.
  • string multicast_address - Multicast address to be used. Similar to specifying the -sync_multicast_address command-line argument.
  • int udp_port - UDP port to be used. Similar to specifying the -sync_port command-line argument.

Return value

Slave interface instance.

Slave engine.syncker.initSlaveUnicast ( int async_mode, int master_udp_port, int slave_udp_port = 0 ) #

Initializes the Syncker as the Slave application with the specified parameters and the unicast mode enabled. Master's IP address will be detected automatically.
Notice
Master must be initialized with broadcast mode enabled as well.

Arguments

  • int async_mode - Async mode flag. Set 1 to use asynchronous mode; 0 - to use synchronous mode.Similar to specifying the -sync_async command-line argument.
    Notice
    Slaves must use the same synchronization mode as the Master.
  • int master_udp_port - UDP port to be used by the Master.
  • int slave_udp_port - UDP port to be used by the Slave. Similar to specifying the -sync_slave_port command-line argument.

Return value

Slave interface instance.

Slave engine.syncker.initSlaveUnicast ( int async_mode, string master_address, int master_udp_port, int slave_udp_port = 0 ) #

Initializes the Syncker as the Slave application with the specified parameters and the unicast mode enabled. Master's IP address is specified explicitly.
Notice
Master must be initialized with broadcast mode enabled as well.

Arguments

  • int async_mode - Async mode flag. Set 1 to use asynchronous mode; 0 - to use synchronous mode.Similar to specifying the -sync_async command-line argument.
    Notice
    Slaves must use the same synchronization mode as the Master.
  • string master_address - Master IP address to be used. Similar to specifying the -sync_master_address command-line argument.
  • int master_udp_port - UDP port to be used by the Master.
  • int slave_udp_port - UDP port to be used by the Slave. Similar to specifying the -sync_slave_port command-line argument.

Return value

Slave interface instance.

Syncker engine.syncker.initSyncker ( ) #

Initializes the Syncker as Master or Slave application depending on the values specified via the command-line arguments.

Return value

Syncker interface instance. It is the base class for Master and Slave.
Last update: 2020-07-31
Build: ()