This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
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 Objects
Sound Objects
Pathfinding Objects
Players
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
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
Art Samples
Tutorials
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.

Unigine::Engine Class

Header: #include <UnigineEngine.h>

The Engine class is required for the engine initialization and executing the main loop of the program. Also, you can get the engine startup options through this class.

Engine Class

Enums

BUILD_CONFIG#

Engine build configuration.
NameDescription
BUILD_CONFIG_DEBUG = 0Debug build configuration.
BUILD_CONFIG_DEVELOPMENT = 1Development build configuration.
BUILD_CONFIG_RELEASE = 2Release build configuration.

CALLBACK_INDEX#

NameDescription
CALLBACK_BEGIN_UPDATE = 0Callback before the update stage is started.
CALLBACK_BEGIN_PROPERTIES_UPDATE = 1Callback before the properties update stage.
CALLBACK_END_PROPERTIES_UPDATE = 2Callback after the properties update stage.
CALLBACK_BEGIN_INPUT_UPDATE = 3Callback before the input update stage.
CALLBACK_END_INPUT_UPDATE = 4Callback after the input update stage.
CALLBACK_BEGIN_CONTROLS_UPDATE = 5Callback before the controls update stage.
CALLBACK_END_CONTROLS_UPDATE = 6Callback after the controls update stage.
CALLBACK_BEGIN_WORLD_MANAGER_UPDATE = 7Callback before the world manager update stage.
CALLBACK_END_WORLD_MANAGER_UPDATE = 8Callback after the world manager update stage.
CALLBACK_BEGIN_SOUND_MANAGER_UPDATE = 9Callback before the sound manager update stage.
CALLBACK_END_SOUND_MANAGER_UPDATE = 10Callback after the sound manager update stage.
CALLBACK_BEGIN_RENDER_MANAGER_UPDATE = 11Callback before the render manager update stage.
CALLBACK_END_RENDER_MANAGER_UPDATE = 12Callback after the render manager update stage.
CALLBACK_BEGIN_LANDSCAPE_UPDATE = 13Callback before the landscape update stage.
CALLBACK_END_LANDSCAPE_UPDATE = 14Callback after the landscape update stage.
CALLBACK_BEGIN_LANDSCAPE_ASYNC_UPDATE = 15Callback before the landscape asynchronous update stage.
CALLBACK_END_LANDSCAPE_ASYNC_UPDATE = 16Callback after the landscape asynchronous update stage.
CALLBACK_BEGIN_GAME_UPDATE = 17Callback before the game logic update stage.
CALLBACK_END_GAME_UPDATE = 18Callback after the game logic update stage.
CALLBACK_BEGIN_RENDER_UPDATE = 19Callback before the render functions update stage.
CALLBACK_END_RENDER_UPDATE = 20Callback after the render functions update stage.
CALLBACK_BEGIN_EXPRESSION_UPDATE = 21Callback before the expressions update stage.
CALLBACK_END_EXPRESSION_UPDATE = 22Callback after the expressions update stage.
CALLBACK_BEGIN_SOUNDS_UPDATE = 23Callback before the sounds update stage.
CALLBACK_END_SOUNDS_UPDATE = 24Callback after the sounds update stage.
CALLBACK_BEGIN_PLUGINS_UPDATE = 25Callback before the plugins update stage.
CALLBACK_END_PLUGINS_UPDATE = 26Callback after the plugins update stage.
CALLBACK_BEGIN_EDITOR_UPDATE = 27Callback before the editor update stage.
CALLBACK_END_EDITOR_UPDATE = 28Callback after the editor update stage.
CALLBACK_BEGIN_SYSTEM_SCRIPT_UPDATE = 29Callback before the system script update stage.
CALLBACK_END_SYSTEM_SCRIPT_UPDATE = 30Callback after the system script update stage.
CALLBACK_BEGIN_SYSTEM_LOGIC_UPDATE = 31Callback before the system logic update stage.
CALLBACK_END_SYSTEM_LOGIC_UPDATE = 32Callback after the system logic update stage.
CALLBACK_BEGIN_WORLD_UPDATE = 33Callback before the world logic update stage.
CALLBACK_END_WORLD_UPDATE = 34Callback after the world logic update stage.
CALLBACK_BEGIN_GUI_UPDATE = 35Callback before the GUI update stage.
CALLBACK_END_GUI_UPDATE = 36Callback after the GUI update stage.
CALLBACK_BEGIN_WORLD_POST_UPDATE = 37Callback before the world logic postupdate stage.
CALLBACK_END_WORLD_POST_UPDATE = 38Callback after the world logic postupdate stage.
CALLBACK_BEGIN_SYSTEM_SCRIPT_POST_UPDATE = 39Callback before the system script postupdate stage.
CALLBACK_END_SYSTEM_SCRIPT_POST_UPDATE = 40Callback after the system script postupdate stage.
CALLBACK_BEGIN_SYSTEM_LOGIC_POST_UPDATE = 41Callback before the system logic postupdate stage.
CALLBACK_END_SYSTEM_LOGIC_POST_UPDATE = 42Callback after the system logic postupdate stage.
CALLBACK_BEGIN_EDITOR_POST_UPDATE = 43Callback before the editor logic postupdate stage.
CALLBACK_END_EDITOR_POST_UPDATE = 44Callback after the editor logic postupdate stage.
CALLBACK_BEGIN_PLUGINS_POST_UPDATE = 45Callback before the plugins postupdate stage.
CALLBACK_END_PLUGINS_POST_UPDATE = 46Callback after the plugins postupdate stage.
CALLBACK_BEGIN_SPATIAL_UPDATE = 47Callback before the spatial tree update stage.
CALLBACK_END_SPATIAL_UPDATE = 48Callback after the spatial tree update stage.
CALLBACK_BEGIN_ASYNC_TASKS_UPDATE = 49Callback before the asynchronous tasks update stage.
CALLBACK_END_ASYNC_TASKS_UPDATE = 50Callback after the asynchronous tasks update stage.
CALLBACK_BEGIN_FILESYSTEM_UPDATE = 51Callback before the filesystem update stage.
CALLBACK_END_FILESYSTEM_UPDATE = 52Callback after the filesystem update stage.
CALLBACK_BEGIN_PHYSICS = 53Callback before the physics module is updated.
CALLBACK_BEGIN_PATHFINDING = 54Callback before the pathfinding module is updated.
CALLBACK_END_UPDATE = 55Callback after the update stage is finished.
CALLBACK_BEGIN_RENDER = 56Callback before the rendering stage is started.
CALLBACK_BEGIN_EDITOR_RENDER = 57Callback before the editor rendering stage.
CALLBACK_END_EDITOR_RENDER = 58Callback after the editor rendering stage.
CALLBACK_BEGIN_PLUGINS_RENDER = 59Callback before the plugins rendering stage.
CALLBACK_END_PLUGINS_RENDER = 60Callback after the plugins rendering stage.
CALLBACK_BEGIN_RENDER_WORLD = 61Callback before the world rendering stage.
CALLBACK_END_RENDER_WORLD = 62Callback after the world rendering stage.
CALLBACK_BEGIN_PLUGINS_GUI = 63Callback before the gui() function of plugins is called.
CALLBACK_END_PLUGINS_GUI = 64Callback after the gui() function of plugins is called.
CALLBACK_BEGIN_GUI_RENDER = 65Callback before the GUI rendering stage.
CALLBACK_END_GUI_RENDER = 66Callback after the GUI rendering stage.
CALLBACK_BEGIN_POST_RENDER = 67Callback before the post-rendering stage.
CALLBACK_END_POST_RENDER = 68Callback after the post-rendering stage.
CALLBACK_END_RENDER = 69Callback after the rendering stage is finished.
CALLBACK_BEGIN_SWAP = 70Callback before the swap stage is started.
CALLBACK_BEGIN_VIDEOGRAB = 71Callback before the videograbbing stage.
CALLBACK_END_VIDEOGRAB = 72Callback after the videograbbing stage.
CALLBACK_END_PHYSICS = 75Callback after the physics calculations are finished.
CALLBACK_BEGIN_PHYSICS_SYNC = 76Callback before the physics synchronization is started.
CALLBACK_END_PHYSICS_SYNC = 77Callback after the physics synchronization is finished.
CALLBACK_END_PATHFINDING = 78Callback after the pathfinding is updated.
CALLBACK_BEGIN_WORLD_SWAP = 79Callback before the world logic swap() function is executed.
CALLBACK_END_WORLD_SWAP = 80Callback after the world logic swap() function is executed.
CALLBACK_BEGIN_PLUGINS_SWAP = 73Callback before the plugin swap() function is called, if it exists.
CALLBACK_END_PLUGINS_SWAP = 74Callback after the plugin swap() function is called, if it exists.
CALLBACK_BEGIN_DELETE_OBJECTS = 81Callback before the objects are deleted.
CALLBACK_END_DELETE_OBJECTS = 82Callback after the objects are deleted.
CALLBACK_END_SWAP = 83Callback after the swap stage is finished.
CALLBACK_INDEX_NUM_CALLBACKS = 84Callback counter.

Members


Engine * get ( ) #

Returns a pointer to the existing engine instance.

Return value

Pointer to the existing engine.

const char * getAppPath ( ) #

Returns the path to a directory where binary executable file is stored.

Return value

Path to a directory where binary executable file is stored.

const char * getArg ( int num ) const#

Returns a command line argument by its index.

Arguments

  • int num - Index of the command line argument.

Return value

Command line argument.

virtual float getArgf ( int num ) const =0#

Returns a command line argument by its index converted to a floating point value.

Arguments

  • int num - Index of the command line argument.

Return value

Command line argument.

virtual int getArgi ( int num ) const =0#

Returns a command line argument by its index converted to an integer value.

Arguments

  • int num - Index of the command line argument.

Return value

Command line argument.

Engine::BUILD_CONFIG getBuildConfiguration ( ) #

Returns the current Engine build configuration.

Return value

Current build configuration. One of the BUILD_CONFIG_ values.

const char * getCachePath ( ) #

Returns a path to a directory where cached files will be stored.

Return value

Path to the directory with cached files.

const char * getDataPath ( ) #

Returns a path to the -data_pathdirectory specified at the engine startup.

Return value

Path to the data directory.

const char * getLibraryModulePath ( ) #

Returns a path to the Engine's dynamic library file.

Return value

Path to the Engine's dynamic library file.

virtual int isDone ( ) const =0#

Returns the done flag on engine quit.

Return value

true if engine is quitting; otherwise, false.

const char * getEditorCache ( ) const#

Returns a path to the editor script cache file.

Return value

Path to the editor script cache.

int getEditorFunction ( const char * name, int num_args ) const#

Returns the editor function identifier.

Arguments

  • const char * name - Name of the editor script function.
  • int num_args - Number of editor script function arguments.

Return value

The editor script function identifier.

int isEditorFunction ( const char * name, int num_args ) const#

Returns a value indicating if the editor script function exists.

Arguments

  • const char * name - Name of the editor script function.
  • int num_args - Number of editor script function arguments.

Return value

1 if the editor script function exists; otherwise, 0.

virtual void * getEditorInterpreter ( ) const =0#

Returns a pointer to the editor interpreter.

Return value

Pointer to the editor interpreter.

virtual int isEditorInterpreter ( ) const =0#

Returns a value indicating if the function is called from the editor script.

Return value

1 if the function is called from the editor script; otherwise, 0.

virtual int isEditorLoaded ( ) const =0#

Returns a value indicating if the editor script is loaded.

Return value

1 if the editor script is loaded; otherwise, 0.

EditorLogic * getEditorLogic ( int num ) const#

Returns the registered EditorLogic instance by its number.

Arguments

  • int num - Number of the EditorLogic instance.

Return value

EditorLogic instance.

const char * getEditorScript ( ) #

Returns a path to the editor script (provided by the -editor_scriptcommand line argument).

Return value

Path to the editor script.

void setEditorVariable ( const char * name, const Variable & v ) #

Sets the editor script variable by its name.

Arguments

  • const char * name - Name of the editor script variable.
  • const Variable & v - Value of the editor script variable.

const Variable & getEditorVariable ( const char * name ) const#

Returns the editor script variable by its name.

Arguments

  • const char * name - Name of the world script variable.

Return value

Value of the editor script variable.

int isEditorVariable ( const char * name ) const#

Returns a value indicating if the editor script variable exists.

Arguments

  • const char * name - Name of the editor script variable.

Return value

1 if the editor script variable exists; otherwise, 0.

String getError ( ) #

Returns the system error message.

Return value

The system error message of the current frame, if there is one; otherwise an empty string.

const char * getExternDefine ( ) const#

Returns the external definitions specified on the application start-up.

Return value

The list of external definitions.

const char * getVersion ( ) const#

Returns the Engine version info.

Return value

Engine version info.

const char * getBuildConfig ( ) const#

Returns the Engine build configuration.

Return value

Engine build configuration (Debug, Development, or Release).

int isDouble ( ) const#

Returns a value indicating if double precision of coordinates is enabled.

Return value

true if double precision of coordinates is enabled; otherwise, false.

const char * getHomePath ( ) #

Returns a path to the user's home directory.

Return value

Path to the user's home directory.

int isInitialized ( ) #

Returns the initialization status of the engine.

Return value

1 if the engine is initialized; otherwise, 0.

float getInterfaceTime ( ) #

Returns the total accumulative time spent on rendering GUI widgets.

Return value

Time value, in milliseconds.

int isMainThread ( ) #

Checks if the current thread is main.

Return value

1 if the current thread is main; otherwise, 0.

int isKnownArg ( ) #

Checks if the specified command line argument is a registered one.

Return value

1 if the specified command line argument is a registered one; otherwise, 0.

String getMessage ( ) #

Returns the last system message of the current frame, or empty string if there are no messages.

Return value

The last system message.

virtual int getNumArgs ( ) =0#

Returns the number of command line arguments.

Return value

Number of command line arguments.

const char * getArg ( int num ) #

Returns the command-line argument by its index.

Arguments

  • int num - Index of the argument

Return value

Command-line argument

int getNumEditorLogics ( ) const#

Returns the number of registered EditorLogic instances.

Return value

Number of EditorLogic instances.

int getNumPluginPaths ( ) #

Returns the number of paths to directories with plugins specified via -plugin_pathcommand-line option.

Return value

Number of the specified paths to directories with plugins.

int getNumPlugins ( ) const#

Returns the number of loaded plugins.

Return value

Number of plugins.

int getNumSystemLogics ( ) const#

Returns the number of registered SystemLogic instances.

Return value

Number of SystemLogic instances.

int getNumWorldLogics ( ) const#

Returns the number of registered WorldLogic instances.

Return value

Number of WorldLogic instances.

SingletonClass * getPlugin ( const char * name ) #

Returns the loaded plugin interface.

Arguments

  • const char * name - Name of the loaded plugin.

Return value

Interface of the loaded plugin, if it exists; otherwise, nullptr.

virtual void * getPluginData ( int num ) const =0#

Returns the loaded plugin data.

Arguments

  • int num - Index of the loaded plugin.

Return value

Data of the loaded plugin, if it exists; otherwise, 0.

virtual Plugin * getPluginInterface ( int num ) const =0#

Returns the loaded plugin interface.

Arguments

  • int num - Index of the loaded plugin.

Return value

Interface of the loaded plugin, if it exists; otherwise, 0.

const char * getPluginName ( int num ) const#

Returns the name of the loaded plugin by its index.

Arguments

  • int num - Index of the loaded plugin.

Return value

Loaded plugin name.

int getPluginOrder ( int num ) const#

Returns the execution order of the loaded plugin by its index.

Arguments

  • int num - Index of the loaded plugin.

Return value

Loaded plugin execution order.

const char * getPluginPath ( int num ) const#

Returns a path to a plugin directory specified via -plugin_path.

Arguments

  • int num - Plugin path number in the row of the specified plugin paths.

Return value

Path to a plugin directory.

float getPresentTime ( ) #

Returns the total time spent on waiting for the GPU after all calculations on the CPU are completed. See the Profiler article for details.

Return value

Time value, in milliseconds.

float getRenderTime ( ) #

Returns the time value, required to prepare all data to be rendered in the current frame and feed rendering commands from the CPU to the GPU. See the Profiler article for details.

Return value

Rendering time value, milliseconds.

const char * getSavePath ( ) #

Returns a path to a directory where a default configuration file, saved files and screenshots will be stored.

Return value

Path to a directory with the default configuration file, saved files, etc.

const char * getSoundApp ( ) const#

Returns the current sound API.

Return value

Sound API used.

const char * getSystemCache ( ) const#

Returns a path to the system script cache.

Return value

Path to the system script cache.

int getSystemFunction ( const char * name, int num_args ) const#

Returns the system function identifier.

Arguments

  • const char * name - Name of the system script function.
  • int num_args - Number of system script function arguments.

Return value

System script function identifier.

int isSystemFunction ( const char * name, int num_args ) const#

Checks whether the system script function exists.

Arguments

  • const char * name - Name of the system script function.
  • int num_args - Number of system script function arguments.

Return value

1 if the system script function exists; otherwise, 0.

virtual void * getSystemInterpreter ( ) const =0#

Returns a pointer to the system interpreter.

Return value

Pointer to the system interpreter.

virtual int isSystemInterpreter ( ) const =0#

Checks if the function is called from the system script.

Return value

1 when the function is called from the system script; otherwise, 0.

SystemLogic * getSystemLogic ( int num ) const#

Returns the registered SystemLogic instance by the given number.

Arguments

  • int num - Number of the SystemLogic instance.

Return value

SystemLogic instance.

const char * getSystemScript ( ) #

Returns a path to the system script.

Return value

Path to the system script.

void setSystemVariable ( const char * name, const Variable & v ) #

Sets a system script variable by a name.

Arguments

  • const char * name - Name of the system script variable.
  • const Variable & v - Value of the system script variable.

const Variable & getSystemVariable ( const char * name ) const#

Returns the system script variable by its name.

Arguments

  • const char * name - Name of the system script variable.

Return value

System script variable.

int isSystemVariable ( const char * name ) const#

Checks whether a system script variable exists.

Arguments

  • const char * name - Name of the system script variable.

Return value

1 if the system script variable exists; otherwise, 0.

float getTotalTime ( ) #

Returns the total time that both rendering and calculating of the frame took (the duration of the main loop in the application execution sequence). Includes update, render, swap and wait GPU.

Return value

Total time value, milliseconds.

float getTotalCPUTime ( ) #

Returns the total CPU time taken to perform calculations for the frame (the duration of the main loop in the application execution sequence). Includes update, render and swap.

Return value

Total CPU time value, milliseconds.

float getUpdateTime ( ) #

Returns the duration of the update phase, during which the objects are prepared for their collision response to be calculated.

Return value

The update phase duration value, milliseconds.

const char * getVideoApp ( ) #

Returns a graphics API used for rendering.

Return value

Graphics API used for rendering.

int getWorldFunction ( const char * name, int num_args ) const#

Returns the world script function identifier.

Arguments

  • const char * name - Name of the world script function.
  • int num_args - Number of world script function arguments.

Return value

World script function identifier.

int isWorldFunction ( const char * name, int num_args ) const#

Returns value indicating if the world script function exists.

Arguments

  • const char * name - Name of the world script function.
  • int num_args - Number of world script function arguments.

Return value

1 if the world script function exists; otherwise, 0.

virtual void * getWorldInterpreter ( ) const =0#

Returns a pointer to the world interpreter.

Return value

Pointer to the world interpreter.

virtual int isWorldInterpreter ( ) const =0#

Returns a value indicating if the function is called from the world script.

Return value

1 if the function is called from the world script; otherwise, 0.

virtual int isWorldLoaded ( ) const =0#

Returns a value indicating if the world script is loaded.

Return value

1 if the world script is loaded; otherwise, 0.

WorldLogic * getWorldLogic ( int num ) const#

Returns the registered WorldLogic instance by its number.

Arguments

  • int num - Number of the WorldLogic instance.

Return value

WorldLogic instance.

void setWorldVariable ( const char * name, const Variable & v ) #

Sets a world script variable by its name.

Arguments

  • const char * name - Name of the world script variable.
  • const Variable & v - Value of the world script variable.

const Variable & getWorldVariable ( const char * name ) const#

Returns a world script variable by its name.

Arguments

  • const char * name - Name of the world script variable.

Return value

World script variable.

int isWorldVariable ( const char * name ) const#

Returns a value indicating if the world script variable exists.

Arguments

  • const char * name - Name of the world script variable.

Return value

1 if the world script variable exists; otherwise, 0.

int addEditorLogic ( EditorLogic * logic ) #

Adds an EditorLogic instance to the engine runtime.

Arguments

Return value

1 if the EditorLogic instance has been added successfully; otherwise, 0.

virtual int addPlugin ( Plugin * plugin ) =0#

Adds a plugin in engine runtime by using a pointer to this plugin.

Arguments

  • Plugin * plugin - Plugin pointer.

Return value

1 if the plugin ha been added successfully; otherwise, 0.

int addPlugin ( const char * name ) #

Adds a plugin in engine runtime by its name.

Arguments

  • const char * name - Plugin name.

Return value

1 if the plugin has been added successfully; otherwise, 0.

int addSystemLogic ( SystemLogic * logic ) #

Adds an SystemLogic instance to the engine runtime.

Arguments

Return value

1 if the SystemLogic instance has been added successfully; otherwise, 0.

int addWorldLogic ( WorldLogic * logic ) #

Adds a WorldLogic instance to the engine runtime.
Notice
Instances of the WorldLogic class should not be added while the world is loaded and the world script is being executed (as you can't change a world script while the world is loaded). In such a case the init() method shall not be called if the WorldLogic is added before opening the world.

Arguments

Return value

1 if the WorldLogic instance has been added successfully; otherwise, 0.

void dialogError ( const char * title ) #

Displays a dialog window with errors set using the error() function.

Arguments

  • const char * title - Title to be displayed in the error window.

void dialogMessage ( const char * title ) #

Displays a dialog window with the last message set using the message() function.

Arguments

  • const char * title - Title to be displayed in the message window.

int findPlugin ( const char * name ) const#

Searches the index of the loaded plugin by its name.

Arguments

  • const char * name - Name of the plugin.

Return value

Index of the plugin if it is found, or -1 otherwise.

Engine * init ( int version, int argc, char ** argv, const char * project, const char * password ) #

Initializes a new engine instance to be used with an external graphics application.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • int argc - Number of command line arguments.
  • char ** argv - Array of command line arguments values.
  • const char * project - Project name. If this parameter is set, it forces the engine to store rewritable data (such as log file, cache files, config files) in user profile rather than in a directory with binaries. Notice that only the project name is required to pass in for this parameter, not the full path to the project. If there is no need to change location of such files, pass the 0 value.
  • const char * password - Password for the filesystem archives. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password.

Return value

Pointer to the new engine instance.

Engine * init ( int version, int argc, wchar_t ** argv, const char * project = 0, const char * password = 0 ) #

Initializes a new engine instance.

Arguments

  • int version - Engine version number (UNIGINE_VERSION).
  • int argc - Number of command line arguments.
  • wchar_t ** argv - Array of command line arguments values.
  • const char * project - Project name. If this parameter is set, it forces the engine to store rewritable data (such as log file, cache files, config files) in user profile rather than in a directory with binaries. Notice that only the project name is required to pass in for this parameter, not the full path to the project. If there is no need to change location of such files, pass the 0 value.
  • const char * password - Password for the filesystem archives. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password.

Return value

Pointer to the new engine instance.

Engine * init ( int version, const char * window_title, int argc, char ** argv, const char * project, const char * password ) #

Initializes a new engine instance to be used with an external graphics application.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • const char * window_title - Title to be set for the application window.
  • int argc - Number of command line arguments.
  • char ** argv - Array of command line arguments values.
  • const char * project - Project name. If this parameter is set, it forces the engine to store rewritable data (such as log file, cache files, config files) in user profile rather than in a directory with binaries. Notice that only the project name is required to pass in for this parameter, not the full path to the project. If there is no need to change location of such files, pass the 0 value.
  • const char * password - Password for the filesystem archives. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password.

Return value

Pointer to the new engine instance.

Engine * init ( int version, const char * window_title, int argc, wchar_t ** argv, const char * project = 0, const char * password = 0 ) #

Initializes a new engine instance.

Arguments

  • int version - Engine version number (UNIGINE_VERSION).
  • const char * window_title - Title to be set for the application window.
  • int argc - Number of command line arguments.
  • wchar_t ** argv - Array of command line arguments values.
  • const char * project - Project name. If this parameter is set, it forces the engine to store rewritable data (such as log file, cache files, config files) in user profile rather than in a directory with binaries. Notice that only the project name is required to pass in for this parameter, not the full path to the project. If there is no need to change location of such files, pass the 0 value.
  • const char * password - Password for the filesystem archives. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password.

Return value

Pointer to the new engine instance.

Engine * init ( int version, CustomApp * app, int argc, wchar_t ** argv, const char * project = 0, const char * password = 0 ) #

Initializes a new engine instance to be used with an external graphics application.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • CustomApp * app - Pointer to the graphics CustomApp class.
  • int argc - Number of command line arguments.
  • wchar_t ** argv - Array of values of command line arguments (a wide-character string).
  • const char * project - Project name. If this parameter is set, it forces the engine to store rewritable data (such as log file, cache files, config files) in user profile rather than in a directory with binaries. Notice that only the project name is required to pass in for this parameter, not the full path to the project. If there is no need to change location of such files, pass the 0 value.
  • const char * password - Password for the filesystem archives. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password.

Return value

Pointer to the new engine instance.

Engine * init ( int version, CustomApp * app, int argc, char ** argv, const char * project = 0, const char * password = 0 ) #

Initializes a new engine instance to be used with an external graphics application.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • CustomApp * app - Pointer to the graphics CustomApp class.
  • int argc - Number of command line arguments.
  • char ** argv - Array of values of command line arguments.
  • const char * project - Project name. If this parameter is set, it forces the engine to store rewritable data (such as log file, cache files, config files) in user profile rather than in a directory with binaries. Notice that only the project name is required to pass in for this parameter, not the full path to the project. If there is no need to change location of such files, pass the 0 value.
  • const char * password - Password for the filesystem archives. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password.

Return value

Pointer to the new engine instance.

Engine * init ( int version, CustomApp * app, const char * window_title, const char * app_path, const char * home_path, int argc, wchar_t ** argv, const char * project = 0, const char * password = 0 ) #

Initializes a new engine instance to be used with an external graphics application, which is stored at the specified path.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • CustomApp * app - Pointer to the graphics CustomApp class.
  • const char * window_title - Title to be set for the application window.
  • const char * app_path - Path to a directory where binary executable file is stored. Pass the 0 value to ignore this parameter.
  • const char * home_path - Path to the user's home directory.
  • int argc - Number of command line arguments.
  • wchar_t ** argv - Array of values of command line arguments (a wide-character string).
  • const char * project - Project name. If this parameter is set, it forces the engine to store rewritable data (such as log file, cache files, config files) in user profile rather than in a directory with binaries. Notice that only the project name is required to pass in for this parameter, not the full path to the project. If there is no need to change location of such files, pass the 0 value.
  • const char * password - Password for the filesystem archives. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password.

Return value

Pointer to the new engine instance.

Engine * init ( int version, CustomApp * app, const char * app_path, const char * home_path, int argc, wchar_t ** argv, const char * project = 0, const char * password = 0 ) #

Initializes a new engine instance to be used with an external graphics application, which is stored at the specified path.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • CustomApp * app - Pointer to the graphics CustomApp class.
  • const char * app_path - Path to a directory where binary executable file is stored. Pass the 0 value to ignore this parameter.
  • const char * home_path - Path to the user's home directory.
  • int argc - Number of command line arguments.
  • wchar_t ** argv - Array of values of command line arguments (a wide-character string).
  • const char * project - Project name. If this parameter is set, it forces the engine to store rewritable data (such as log file, cache files, config files) in user profile rather than in a directory with binaries. Notice that only the project name is required to pass in for this parameter, not the full path to the project. If there is no need to change location of such files, pass the 0 value.
  • const char * password - Password for the filesystem archives. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password.

Return value

Pointer to the new engine instance.

Engine * init ( int version, CustomApp * app, const char * window_title, const char * app_path, const char * home_path, int argc, char ** argv, const char * project = 0, const char * password = 0 ) #

Initializes a new engine instance to be used with an external graphics application, which is stored at the specified path.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • CustomApp * app - Pointer to the graphics CustomApp class.
  • const char * window_title - Title to be set for the application window.
  • const char * app_path - Path to a directory where binary executable file is stored. Pass the 0 value to ignore this parameter.
  • const char * home_path - Path to the user's home directory.
  • int argc - Number of command line arguments.
  • char ** argv - Array of values of command line arguments.
  • const char * project - Project name. If this parameter is set, it forces the engine to store rewritable data (such as log file, cache files, config files) in user profile rather than in a directory with binaries. Notice that only the project name is required to pass in for this parameter, not the full path to the project. If there is no need to change location of such files, pass the 0 value.
  • const char * password - Password for the filesystem archives. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password.

Return value

Pointer to the new engine instance.

Engine * init ( int version, CustomApp * app, const char * app_path, const char * home_path, int argc, char ** argv, const char * project = 0, const char * password = 0 ) #

Initializes a new engine instance to be used with an external graphics application, which is stored at the specified path.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • CustomApp * app - Pointer to the graphics CustomApp class.
  • const char * app_path - Path to a directory where binary executable file is stored. Pass the 0 value to ignore this parameter.
  • const char * home_path - Path to the user's home directory.
  • int argc - Number of command line arguments.
  • char ** argv - Array of values of command line arguments.
  • const char * project - Project name. If this parameter is set, it forces the engine to store rewritable data (such as log file, cache files, config files) in user profile rather than in a directory with binaries. Notice that only the project name is required to pass in for this parameter, not the full path to the project. If there is no need to change location of such files, pass the 0 value.
  • const char * password - Password for the filesystem archives. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password.

Return value

Pointer to the new engine instance.

void main ( SystemLogic * system, WorldLogic * world, EditorLogic * editor ) #

Engine main loop. Replaces the following commands:
Source code (C++)
while (isDone() == 0) { 
	update();  
	render(); 
	swap(); 
}
Source code (C#)
while (!IsDone) { 
	Update();  
	Render(); 
	Swap(); 
}

Arguments

int removeEditorLogic ( EditorLogic * logic ) #

Removes an EditorLogic instance from engine runtime.

Arguments

Return value

1 if the instance has been removed successfully; otherwise, 0.

virtual int removePlugin ( Plugin * plugin ) =0#

Removes a plugin by using a pointer to this plugin.

Arguments

  • Plugin * plugin - Plugin pointer to remove.

Return value

1 if the plugin has been removed successfully; otherwise, 0.

int removeSystemLogic ( SystemLogic * logic ) #

Removes a SystemLogic instance from engine runtime.

Arguments

Return value

1 if the instance has been removed successfully; otherwise, 0.

int removeWorldLogic ( WorldLogic * logic ) #

Removes a WorldLogic instance from engine runtime.
Notice
Instances of the WorldLogic class should not be removed while the world is loaded and the world script is being executed (as you can't change a world script while the world is loaded). In such a case the shutdown() method shall not be called if the WorldLogic is removed before closing the world.

Arguments

Return value

1 if the instance has been removed successfully; otherwise, 0.

virtual void render ( ) =0#

Engine rendering function. This function must be called every frame.

virtual const Variable & runEditorFunction ( const Variable & name ) =0#

Runs the editor script function by its name. The target function can receive up to 8 arguments.

Arguments

  • const Variable & name - Name of the editor script function.

Return value

Editor script function return value.

const Variable & runEditorFunction ( const Variable & name, const Variable & a0 ) #

Runs the editor script function by its name. The target function must receive 1 argument.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable & a0 - First argument.

Return value

Editor script function return value.

const Variable & runEditorFunction ( const Variable & name, const Variable & a0, const Variable & a1 ) #

Runs the editor script function by its name. The target function must receive 2 arguments.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.

Return value

Editor script function return value.

const Variable & runEditorFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2 ) #

Runs the editor script function by its name. The target function must receive 3 arguments.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.

Return value

Editor script function return value.

const Variable & runEditorFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3 ) #

Runs the editor script function by its name. The target function must receive 4 arguments.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.

Return value

Editor script function return value.

const Variable & runEditorFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4 ) #

Runs the editor script function by its name. The target function must receive 5 arguments.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.

Return value

Editor script function return value.

const Variable & runEditorFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5 ) #

Runs the editor script function by its name. The target function must receive 6 arguments.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.

Return value

Editor script function return value.

const Variable & runEditorFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6 ) #

Runs the editor script function by its name. The target function must receive 7 arguments.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.

Return value

Editor script function return value.

const Variable & runEditorFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6, const Variable & a7 ) #

Runs the editor script function by its name. The target function must receive 8 arguments.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.
  • const Variable & a7 - Eighth argument.

Return value

Editor script function return value.

virtual const Variable & runEditorFunction ( const Variable & name, const Variable * args, int num_args ) =0#

Runs the editor script function by its name.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable * args - Pointer to editor script function arguments.
  • int num_args - Number of editor script function arguments.

Return value

Editor script function return value.

const Variable & runEditorFunction ( int id ) #

Runs the editor script function by its id. The target function can receive up to 8 arguments.

Arguments

  • int id - ID of the editor script function.

Return value

Editor script function return value.

const Variable & runEditorFunction ( int id, const Variable * args, int num_args ) #

Runs the editor script function by its id.

Arguments

  • int id - ID of the editor script function.
  • const Variable * args - Pointer to editor script function arguments.
  • int num_args - Number of editor script function arguments.

Return value

Editor script function return value.

const Variable & runEditorFunction ( int id, const Variable & a0 ) #

Runs the editor script function by its name. The target function must receive 1 argument.

Arguments

  • int id - ID of the editor script function.
  • const Variable & a0 - First argument.

Return value

Editor script function return value.

const Variable & runEditorFunction ( int id, const Variable & a0, const Variable & a1 ) #

Runs the editor script function by its name. The target function must receive 2 arguments.

Arguments

  • int id - ID of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.

Return value

Editor script function return value.

const Variable & runEditorFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2 ) #

Runs the editor script function by its name. The target function must receive 3 arguments.

Arguments

  • int id - ID of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.

Return value

Editor script function return value.

const Variable & runEditorFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3 ) #

Runs the editor script function by its name. The target function must receive 4 arguments.

Arguments

  • int id - ID of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.

Return value

Editor script function return value.

const Variable & runEditorFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4 ) #

Runs the editor script function by its name. The target function must receive 5 arguments.

Arguments

  • int id - ID of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.

Return value

Editor script function return value.

const Variable & runEditorFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5 ) #

Runs the editor script function by its name. The target function must receive 6 arguments.

Arguments

  • int id - ID of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.

Return value

Editor script function return value.

const Variable & runEditorFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6 ) #

Runs the editor script function by its name. The target function must receive 7 arguments.

Arguments

  • int id - ID of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.

Return value

Editor script function return value.

const Variable & runEditorFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6, const Variable & a7 ) #

Runs the editor script function by its name. The target function must receive 8 arguments.

Arguments

  • int id - ID of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.
  • const Variable & a7 - Eighth argument.

Return value

Editor script function return value.

virtual const Variable & runSystemFunction ( const Variable & name ) =0#

Runs the system script function by its name. The target function can receive up to 8 arguments.

Arguments

  • const Variable & name - Name of the system script function.

Return value

System script function return value.

const Variable & runSystemFunction ( const Variable & name, const Variable & a0 ) #

Runs the system script function by its name. The target function must receive 1 argument.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable & a0 - First argument.

Return value

System script function return value.

const Variable & runSystemFunction ( const Variable & name, const Variable & a0, const Variable & a1 ) #

Runs the system script function by its name. The target function must receive 2 arguments.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.

Return value

System script function return value.

const Variable & runSystemFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2 ) #

Runs the system script function by its name. The target function must receive 3 arguments.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.

Return value

System script function return value.

const Variable & runSystemFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3 ) #

Runs the system script function by its name. The target function must receive 4 arguments.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.

Return value

System script function return value.

const Variable & runSystemFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4 ) #

Runs the system script function by its name. The target function must receive 4 arguments.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.

Return value

System script function return value.

const Variable & runSystemFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5 ) #

Runs the system script function by its name. The target function must receive 6 arguments.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.

Return value

System script function return value.

const Variable & runSystemFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6 ) #

Runs the system script function by its name. The target function must receive 7 arguments.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.

Return value

System script function return value.

const Variable & runSystemFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6, const Variable & a7 ) #

Runs the system script function by its name. The target function must receive 8 arguments.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.
  • const Variable & a7 - Eighth argument.

Return value

System script function return value.

virtual const Variable & runSystemFunction ( const Variable & name, const Variable * args, int num_args ) =0#

Runs system script function by its name.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable * args - Pointer to system script function arguments.
  • int num_args - Number of system script function arguments.

Return value

System script function return value.

const Variable & runSystemFunction ( int id ) #

Runs the system script function by its id. The target function can receive up to 8 arguments.

Arguments

  • int id - ID of the system script function.

Return value

System script function return value.

const Variable & runSystemFunction ( int id, const Variable * args, int num_args ) #

Runs system script function by its id.

Arguments

  • int id - ID of the system script function.
  • const Variable * args - Pointer to system script function arguments.
  • int num_args - Number of system script function arguments.

const Variable & runSystemFunction ( int id, const Variable & a0 ) #

Runs the system script function by its id. The target function must receive 1 argument.

Arguments

  • int id - ID of the system script function.
  • const Variable & a0 - First argument.

Return value

System script function return value.

const Variable & runSystemFunction ( int id, const Variable & a0, const Variable & a1 ) #

Runs the system script function by its id. The target function must receive 2 arguments.

Arguments

  • int id - ID of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.

Return value

System script function return value.

const Variable & runSystemFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2 ) #

Runs the system script function by its id. The target function must receive 3 arguments.

Arguments

  • int id - ID of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.

Return value

System script function return value.

const Variable & runSystemFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3 ) #

Runs the system script function by its id. The target function must receive 4 arguments.

Arguments

  • int id - ID of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.

Return value

System script function return value.

const Variable & runSystemFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4 ) #

Runs the system script function by its id. The target function must receive 5 arguments.

Arguments

  • int id - ID of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.

Return value

System script function return value.

const Variable & runSystemFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5 ) #

Runs the system script function by its id. The target function must receive 6 arguments.

Arguments

  • int id - ID of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.

Return value

System script function return value.

const Variable & runSystemFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6 ) #

Runs the system script function by its id. The target function must receive 7 arguments.

Arguments

  • int id - ID of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.

Return value

System script function return value.

const Variable & runSystemFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6, const Variable & a7 ) #

Runs the system script function by its id. The target function must receive 8 arguments.

Arguments

  • int id - ID of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.
  • const Variable & a7 - Eighth argument.

Return value

System script function return value.

virtual const Variable & runWorldFunction ( const Variable & name ) =0#

Runs the world script function by its name. The target function can receive up to 8 arguments.

Arguments

  • const Variable & name - Name of the world script function.

Return value

World script function return value.

const Variable & runWorldFunction ( const Variable & name, const Variable & a0 ) #

Runs the world script function by its name. The target function must receive 1 argument.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable & a0 - First argument.

Return value

World script function return value.

const Variable & runWorldFunction ( int id, const Variable & a0 ) #

Runs the world script function by its identifier. The target function must receive one argument.

Arguments

  • int id - Identifier of the world script function.
  • const Variable & a0 - Argument

Return value

World script function return value.

const Variable & runWorldFunction ( const Variable & name, const Variable & a0, const Variable & a1 ) #

Runs the world script function by its name. The target function must receive 2 arguments.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.

Return value

World script function return value.

const Variable & runWorldFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2 ) #

Runs the world script function by its name. The target function must receive 3 arguments.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.

Return value

World script function return value.

const Variable & runWorldFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3 ) #

Runs the world script function by its name. The target function must receive 4 arguments.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.

Return value

World script function return value.

const Variable & runWorldFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4 ) #

Runs the world script function by its name. The target function must receive 5 arguments.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.

Return value

World script function return value.

const Variable & runWorldFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5 ) #

Runs the world script function by its name. The target function must receive 6 arguments.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.

Return value

World script function return value.

const Variable & runWorldFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6 ) #

Runs the world script function by its name. The target function must receive 8 arguments.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.

Return value

World script function return value.

const Variable & runWorldFunction ( const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6, const Variable & a7 ) #

Runs the world script function by its name. The target function must receive 8 arguments.

Arguments

Return value

World script function return value.

virtual const Variable & runWorldFunction ( const Variable & name, const Variable * args, int num_args ) =0#

Runs the world script function by its name.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable * args - Pointer to world script function arguments.
  • int num_args - Number of world script function arguments.

Return value

World script function return value.

const Variable & runWorldFunction ( int id ) #

Runs the world script function by its id.

Arguments

  • int id - ID of the world script function.

Return value

World script function return value.

const Variable & runWorldFunction ( int id, const Variable * args, int num_args ) #

Runs the world script function by its id.

Arguments

  • int id - ID of the world script function.
  • const Variable * args - Pointer to world script function arguments.
  • int num_args - Number of world script function arguments.

Return value

World script function return value.

const Variable & runWorldFunction ( int id, const Variable & a0, const Variable & a1 ) #

Runs the world script function by its id. The target function must receive 2 arguments.

Arguments

  • int id - ID of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.

Return value

World script function return value.

const Variable & runWorldFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2 ) #

Runs the world script function by its id. The target function must receive 3 arguments.

Arguments

  • int id - ID of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.

Return value

World script function return value.

const Variable & runWorldFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3 ) #

Arguments

  • int id - ID of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.

Return value

World script function return value.Runs the world script function by its id. The target function must receive 4 arguments.

const Variable & runWorldFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4 ) #

Runs the world script function by its id. The target function must receive 5 arguments.

Arguments

  • int id - ID of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.

Return value

World script function return value.

const Variable & runWorldFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5 ) #

Runs the world script function by its id. The target function must receive 6 arguments.

Arguments

  • int id - ID of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.

Return value

World script function return value.

const Variable & runWorldFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6 ) #

Runs the world script function by its id. The target function must receive 7 arguments.

Arguments

  • int id - ID of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.

Return value

World script function return value.

const Variable & runWorldFunction ( int id, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6, const Variable & a7 ) #

Runs the world script function by its id. The target function must receive 8 arguments.

Arguments

  • int id - ID of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.
  • const Variable & a7 - Eighth argument.

Return value

World script function return value.

void shutdown ( ) #

Deletes the pointer to the existing engine instance.

virtual void swap ( ) =0#

Engine swap buffers function. This function must be called every frame.

virtual void update ( ) =0#

Engine update function. This function must be called every frame.

int isEvaluation ( ) const#

Returns a value indicating if the current version of the Engine is for evaluation only.

Return value

1 if the evaluation version of the Engine is used; otherwise, 0.true if the evaluation version of the Engine is used; otherwise, false.

int64_t getFrame ( ) #

Returns the number of the current engine frame.

Return value

Engine frame number.

void * addCallback ( Engine::CALLBACK_INDEX callback, CallbackBase * func ) #

Adds a callback for the specified stage of the execution sequence. Callback functions can be used to get access to WorldLogic::update(), node update, GUI (and callback) update, WorldLogic::postUpdate() within the main loop.

Arguments

Return value

ID of the last added callback of the specified type, if the callback was added successfully; otherwise, nullptr. This ID can be used to remove this callback when necessary.

bool removeCallback ( Engine::CALLBACK_INDEX callback, void * id ) #

Removes the specified callback from the list of callbacks for the specified stage of the execution sequence. Callback functions can be used to get access to WorldLogic::update(), node update, GUI (and callback) update, WorldLogic::postUpdate() within the main loop.

Arguments

  • Engine::CALLBACK_INDEX callback - Stage of the execution sequence for which a callback is to be added. One of the CALLBACK_* variables.
    Notice
    The _BEGIN prefix corresponds to the beginning of the execution sequence step, _END — to its completion.
  • void * id - Callback ID obtained when the callback is added.

Return value

True if the callback with the given ID was removed successfully; otherwise false.

void clearCallbacks ( Engine::CALLBACK_INDEX callback ) #

Clears all added callbacks for the specified stage of the execution sequence. Callback functions can be used to get access to WorldLogic::update(), node update, GUI (and callback) update, WorldLogic::postUpdate() within the main loop.

Arguments

Last update: 2021-08-24
Build: ()