This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
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
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
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
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

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.

GCMODE#

Garbage collection mode. For more information on garbage collection for C# please refer to the Garbage Collector article.
NameDescription
DEFAULT = 0Default C# garbage collector mode. In this case heavy spikes and excessive memory consumption are imminent if you don't manage your objects properly and do not use the Dispose() method.
USE_MEMORY_PRESSURE = 1Passes the information about C++ memory consumption to C#. This results in more frequent GC calls preventing the application from eating too much memory right after startup and removing heavy spikes.
EVERY_FRAME = 2The garbage collector is called every frame. This results in overall performance reduction, but removes heavy spikes.
WORLD_SHUTDOWN = 3The garbage collector is called on closing the world. This mode is ideal if the number of memory allocations is your code is insignificant.

CALLBACK_INDEX#

NameDescription
BEGIN_UPDATE = 0Callback before the update stage is started.
BEGIN_PROPERTIES_UPDATE = 1Callback before the properties update stage.
END_PROPERTIES_UPDATE = 2Callback after the properties update stage.
BEGIN_INPUT_UPDATE = 3Callback before the input update stage.
END_INPUT_UPDATE = 4Callback after the input update stage.
BEGIN_CONTROLS_UPDATE = 5Callback before the controls update stage.
END_CONTROLS_UPDATE = 6Callback after the controls update stage.
BEGIN_WORLD_MANAGER_UPDATE = 7Callback before the world manager update stage.
END_WORLD_MANAGER_UPDATE = 8Callback after the world manager update stage.
BEGIN_SOUND_MANAGER_UPDATE = 9Callback before the sound manager update stage.
END_SOUND_MANAGER_UPDATE = 10Callback after the sound manager update stage.
BEGIN_RENDER_MANAGER_UPDATE = 11Callback before the render manager update stage.
END_RENDER_MANAGER_UPDATE = 12Callback after the render manager update stage.
BEGIN_LANDSCAPE_UPDATE = 13Callback before the landscape update stage.
END_LANDSCAPE_UPDATE = 14Callback after the landscape update stage.
BEGIN_LANDSCAPE_ASYNC_UPDATE = 15Callback before the landscape asynchronous update stage.
END_LANDSCAPE_ASYNC_UPDATE = 16Callback after the landscape asynchronous update stage.
BEGIN_GAME_UPDATE = 17Callback before the game logic update stage.
END_GAME_UPDATE = 18Callback after the game logic update stage.
BEGIN_RENDER_UPDATE = 19Callback before the render functions update stage.
END_RENDER_UPDATE = 20Callback after the render functions update stage.
BEGIN_EXPRESSION_UPDATE = 21Callback before the expressions update stage.
END_EXPRESSION_UPDATE = 22Callback after the expressions update stage.
BEGIN_SOUNDS_UPDATE = 23Callback before the sounds update stage.
END_SOUNDS_UPDATE = 24Callback after the sounds update stage.
BEGIN_PLUGINS_UPDATE = 25Callback before the plugins update stage.
END_PLUGINS_UPDATE = 26Callback after the plugins update stage.
BEGIN_EDITOR_UPDATE = 27Callback before the editor update stage.
END_EDITOR_UPDATE = 28Callback after the editor update stage.
BEGIN_SYSTEM_SCRIPT_UPDATE = 29Callback before the system script update stage.
END_SYSTEM_SCRIPT_UPDATE = 30Callback after the system script update stage.
BEGIN_SYSTEM_LOGIC_UPDATE = 31Callback before the system logic update stage.
END_SYSTEM_LOGIC_UPDATE = 32Callback after the system logic update stage.
BEGIN_WORLD_UPDATE = 33Callback before the world logic update stage.
END_WORLD_UPDATE = 34Callback after the world logic update stage.
BEGIN_GUI_UPDATE = 35Callback before the GUI update stage.
END_GUI_UPDATE = 36Callback after the GUI update stage.
BEGIN_WORLD_POST_UPDATE = 37Callback before the world logic postupdate stage.
END_WORLD_POST_UPDATE = 38Callback after the world logic postupdate stage.
BEGIN_SYSTEM_SCRIPT_POST_UPDATE = 39Callback before the system script postupdate stage.
END_SYSTEM_SCRIPT_POST_UPDATE = 40Callback after the system script postupdate stage.
BEGIN_SYSTEM_LOGIC_POST_UPDATE = 41Callback before the system logic postupdate stage.
END_SYSTEM_LOGIC_POST_UPDATE = 42Callback after the system logic postupdate stage.
BEGIN_EDITOR_POST_UPDATE = 43Callback before the editor logic postupdate stage.
END_EDITOR_POST_UPDATE = 44Callback after the editor logic postupdate stage.
BEGIN_PLUGINS_POST_UPDATE = 45Callback before the plugins postupdate stage.
END_PLUGINS_POST_UPDATE = 46Callback after the plugins postupdate stage.
BEGIN_SPATIAL_UPDATE = 47Callback before the spatial tree update stage.
END_SPATIAL_UPDATE = 48Callback after the spatial tree update stage.
BEGIN_ASYNC_TASKS_UPDATE = 49Callback before the asynchronous tasks update stage.
END_ASYNC_TASKS_UPDATE = 50Callback after the asynchronous tasks update stage.
BEGIN_FILESYSTEM_UPDATE = 51Callback before the filesystem update stage.
END_FILESYSTEM_UPDATE = 52Callback after the filesystem update stage.
BEGIN_PHYSICS = 53Callback before the physics module is updated.
BEGIN_PATHFINDING = 54Callback before the pathfinding module is updated.
END_UPDATE = 55Callback after the update stage is finished.
BEGIN_RENDER = 56Callback before the rendering stage is started.
BEGIN_EDITOR_RENDER = 57Callback before the editor rendering stage.
END_EDITOR_RENDER = 58Callback after the editor rendering stage.
BEGIN_PLUGINS_RENDER = 59Callback before the plugins rendering stage.
END_PLUGINS_RENDER = 60Callback after the plugins rendering stage.
BEGIN_RENDER_WORLD = 61Callback before the world rendering stage.
END_RENDER_WORLD = 62Callback after the world rendering stage.
BEGIN_PLUGINS_GUI = 63Callback before the gui() function of plugins is called.
END_PLUGINS_GUI = 64Callback after the gui() function of plugins is called.
BEGIN_GUI_RENDER = 65Callback before the GUI rendering stage.
END_GUI_RENDER = 66Callback after the GUI rendering stage.
BEGIN_POST_RENDER = 67Callback before the post-rendering stage.
END_POST_RENDER = 68Callback after the post-rendering stage.
END_RENDER = 69Callback after the rendering stage is finished.
BEGIN_SWAP = 70Callback before the swap stage is started.
BEGIN_VIDEOGRAB = 71Callback before the videograbbing stage.
END_VIDEOGRAB = 72Callback after the videograbbing stage.
END_PHYSICS = 75Callback after the physics calculations are finished.
BEGIN_PHYSICS_SYNC = 76Callback before the physics synchronization is started.
END_PHYSICS_SYNC = 77Callback after the physics synchronization is finished.
END_PATHFINDING = 78Callback after the pathfinding is updated.
BEGIN_WORLD_SWAP = 79Callback before the world logic swap() function is executed.
END_WORLD_SWAP = 80Callback after the world logic swap() function is executed.
BEGIN_PLUGINS_SWAP = 73Callback before the plugin swap() function is called, if it exists.
END_PLUGINS_SWAP = 74Callback after the plugin swap() function is called, if it exists.
BEGIN_DELETE_OBJECTS = 81Callback before the objects are deleted.
END_DELETE_OBJECTS = 82Callback after the objects are deleted.
END_SWAP = 83Callback after the swap stage is finished.
NUM_CALLBACKS = 84Callback counter.

PRECISION#

Engine precision type.
NameDescription
PRECISION_FLOAT = 0Float precision type.
PRECISION_DOUBLE = 1Double precision type.

Properties

bool IsInitialized#

The Value indicating whether the engine is initialized or not.

Engine.GCMODE GCMode_#

The Garbage Collection mode.

string AppPath#

The Path to a directory where binary executable file is stored.

string DataPath#

The Path to the data directory.

string HomePath#

The Path to the user's home directory.

string SavePath#

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

string CachePath#

The Path to the directory with cached files.

int NumPluginPaths#

The Number of the specified paths to directories with plugins.

string SystemScript#

The Path to the system script.

string EditorScript#

The Path to the editor script.

string SystemCache#

The Path to the system script cache.

string EditorCache#

The Path to the editor script cache.

string VideoApp#

The Graphics API used for rendering.

string SoundApp#

The Sound API used.

string ExternDefine#

The list of external definitions.

string Features#

The list of features like OpenGL, Direct3D, Microprofile, Geodetic, etc.

string Version#

The Engine version info.

string BuildConfig#

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

bool BackgroundUpdate#

The value indicating whether the application window is updated when the window is hidden or out of focus (rendering frames in background). By default your UNIGINE application stops rendering frames and updating its main window, when it window goes out of focus (e.g. user switches to another window). Setting the background update mode enables constant rendering regardless of whether the application window is focused or in the background.

bool IsActive#

The active state of the Engine.

bool IsFocus#

The active state of the Engine.

bool IsQuit#

The quitting flag on engine quit.

float TotalTime#

The Returns the total time (in milliseconds) 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.

float TotalCPUTime#

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

float UpdateTime#

The Duration (in milliseconds) of the update phase, during which the objects are prepared for their collision response to be calculated.

float RenderTime#

The Time (in milliseconds) 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.

float PresentTime#

The Total time (in milliseconds) spent on waiting for the GPU after all calculations on the CPU are completed. See the Profiler article for details.

float InterfaceTime#

The Total accumulative time (in milliseconds) spent on rendering GUI widgets.

Int64 Frame#

The Number of the current engine frame.

float Fps#

The value of the Engine FPS counter.

float IFps#

The inverse value of the Engine FPS counter (1/FPS).

float StatisticsFpsMin#

The minimum FPS counter value for the last 600 frames.

float StatisticsFpsAvg#

The average FPS counter value for the last 600 frames.

float StatisticsFpsMax#

The maximum FPS counter value for the last 600 frames.

bool MainThread#

The Value indicating if the current thread is main.

bool Evaluation#

The Value indicating if the current version of the Engine is for evaluation only.

int NumEditorLogics#

The Number of EditorLogic instances.

int NumWorldLogics#

The Number of WorldLogic instances.

int NumSystemLogics#

The Number of SystemLogic instances.

int NumArgs#

The Number of command line arguments.

int NumPlugins#

The Number of loaded plugins.

Members


string GetArg ( int num ) #

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 ) =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 ) =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.

string getLibraryModulePath ( ) #

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

Return value

Path to the Engine's dynamic library file.

int GetEditorFunction ( string name, int num_args ) #

Returns the editor function identifier.

Arguments

  • string name - Name of the editor script function.
  • int num_args - Number of editor script function arguments.

Return value

The editor script function identifier.

bool IsEditorFunction ( string name, int num_args ) #

Returns a value indicating if the editor script function exists.

Arguments

  • string name - Name of the editor script function.
  • int num_args - Number of editor script function arguments.

Return value

true if the editor script function exists; otherwise, false.

virtual IntPtr GetEditorInterpreter ( ) =0#

Returns a pointer to the editor interpreter.

Return value

Pointer to the editor interpreter.

virtual bool IsEditorInterpreter ( ) =0#

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

Return value

true if the function is called from the editor script; otherwise, false.

virtual bool IsEditorLoaded ( ) =0#

Returns a value indicating if the editor script is loaded.

Return value

true if the editor script is loaded; otherwise, false.

EditorLogic GetEditorLogic ( int num ) #

Returns the registered EditorLogic instance by its number.

Arguments

  • int num - Number of the EditorLogic instance.

Return value

EditorLogic instance.

void SetEditorVariable ( string name, Variable v ) #

Sets the editor script variable by its name.

Arguments

  • string name - Name of the editor script variable.
  • Variable v - Value of the editor script variable.

Variable GetEditorVariable ( string name ) #

Returns the editor script variable by its name.

Arguments

  • string name - Name of the world script variable.

Return value

Value of the editor script variable.

bool IsEditorVariable ( string name ) #

Returns a value indicating if the editor script variable exists.

Arguments

  • string name - Name of the editor script variable.

Return value

true if the editor script variable exists; otherwise, false.

string GetArg ( int num ) #

Returns the command-line argument by its index.

Arguments

  • int num - Index of the argument

Return value

Command-line argument

string GetPluginName ( int num ) #

Returns the name of the loaded plugin by its index.

Arguments

  • int num - Index of the loaded plugin.

Return value

Loaded plugin name.

string GetPluginPath ( int num ) #

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.

int GetSystemFunction ( string name, int num_args ) #

Returns the system function identifier.

Arguments

  • string name - Name of the system script function.
  • int num_args - Number of system script function arguments.

Return value

System script function identifier.

IsSystemFunction ( string name, int num_args ) #

Checks whether the system script function exists.

Arguments

  • string name - Name of the system script function.
  • int num_args - Number of system script function arguments.

Return value

true if the system script function exists; otherwise, false.

virtual IntPtr GetSystemInterpreter ( ) =0#

Returns a pointer to the system interpreter.

Return value

Pointer to the system interpreter.

virtual bool IsSystemInterpreter ( ) =0#

Checks if the function is called from the system script.

Return value

true when the function is called from the system script; otherwise, false.

virtual System GetSystemLogic ( int num ) =0#

Returns the registered SystemLogic instance by the given number.

Arguments

  • int num - Number of the SystemLogic instance.

Return value

SystemLogic instance.

void SetSystemVariable ( string name, Variable v ) #

Sets a system script variable by a name.

Arguments

  • string name - Name of the system script variable.
  • Variable v - Value of the system script variable.

Variable GetSystemVariable ( string name ) #

Returns the system script variable by its name.

Arguments

  • string name - Name of the system script variable.

Return value

System script variable.

bool IsSystemVariable ( string name ) #

Checks whether a system script variable exists.

Arguments

  • string name - Name of the system script variable.

Return value

true if the system script variable exists; otherwise, false.

int GetWorldFunction ( string name, int num_args ) #

Returns the world script function identifier.

Arguments

  • string name - Name of the world script function.
  • int num_args - Number of world script function arguments.

Return value

World script function identifier.

bool IsWorldFunction ( string name, int num_args ) #

Returns value indicating if the world script function exists.

Arguments

  • string name - Name of the world script function.
  • int num_args - Number of world script function arguments.

Return value

true if the world script function exists; otherwise, false.

virtual IntPtr GetWorldInterpreter ( ) =0#

Returns a pointer to the world interpreter.

Return value

Pointer to the world interpreter.

virtual bool IsWorldInterpreter ( ) =0#

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

Return value

true if the function is called from the world script; otherwise, false.

virtual bool IsWorldLoaded ( ) =0#

Returns a value indicating if the world script is loaded.

Return value

true if the world script is loaded; otherwise, false.

virtual WorldLogic GetWorldLogic ( int num ) =0#

Returns the registered WorldLogic instance by its number.

Arguments

  • int num - Number of the WorldLogic instance.

Return value

WorldLogic instance.

void SetWorldVariable ( string name, Variable v ) #

Sets a world script variable by its name.

Arguments

  • string name - Name of the world script variable.
  • Variable v - Value of the world script variable.

Variable GetWorldVariable ( string name ) #

Returns a world script variable by its name.

Arguments

  • string name - Name of the world script variable.

Return value

World script variable.

bool IsWorldVariable ( string name ) #

Returns a value indicating if the world script variable exists.

Arguments

  • string name - Name of the world script variable.

Return value

true if the world script variable exists; otherwise, false.

bool AddEditorLogic ( EditorLogic logic ) #

Adds an EditorLogic instance to the engine runtime.

Arguments

Return value

true if the EditorLogic instance has been added successfully; otherwise, false.

virtual bool AddPlugin ( Plugin plugin ) =0#

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

Arguments

Return value

true if the plugin ha been added successfully; otherwise, false.

bool AddPlugin ( string name ) #

Adds a plugin to engine runtime by its name.

Arguments

  • string name - Plugin name.

Return value

true if the plugin has been added successfully; otherwise, false.

bool AddSystemLogic ( System logic ) #

Adds a SystemLogic instance to Engine runtime.

Arguments

Return value

true if the SystemLogic instance has been added successfully; otherwise, false.

bool 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

true if the WorldLogic instance has been added successfully; otherwise, false.

int FindPlugin ( string name ) #

Searches the index of the loaded plugin by its name.

Arguments

  • string name - Name of the plugin.

Return value

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

void Main ( SystemLogic system, WorldLogic world, EditorLogic editor ) #

Engine main loop. Replaces the following commands:
Source code (C++)
while (!Engine::get()->isQuit()) { 
	Engine::get()->update();  
	Engine::get()->render(); 
	Engine::get()->swap(); 
}
Source code (C#)
while (!Engine.IsQuit) { 
	Engine.Update();  
	Engine.Render(); 
	Engine.Swap(); 
}

Arguments

bool RemoveEditorLogic ( EditorLogic logic ) #

Removes an EditorLogic instance from engine runtime.

Arguments

Return value

true if the instance has been removed successfully; otherwise, false.

virtual bool RemovePlugin ( Plugin plugin ) =0#

Removes a plugin by using a pointer to this plugin.

Arguments

  • Plugin plugin - Plugin instance to remove.

Return value

true if the plugin has been removed successfully; otherwise, false.

bool RemoveSystemLogic ( System logic ) #

Removes a SystemLogic instance from engine runtime.

Arguments

Return value

true if the instance has been removed successfully; otherwise, false.

bool 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

true if the instance has been removed successfully; otherwise, false.

virtual Variable RunEditorFunction ( Variable name ) =0#

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

Arguments

  • Variable name - Name of the editor script function.

Return value

Editor script function return value.

Variable RunEditorFunction ( Variable name, Variable a0 ) #

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

Arguments

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

Return value

Editor script function return value.

Variable RunEditorFunction ( Variable name, Variable a0, Variable a1 ) #

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

Arguments

Return value

Editor script function return value.

Variable RunEditorFunction ( Variable name, Variable a0, Variable a1, Variable a2 ) #

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

Arguments

Return value

Editor script function return value.

Variable RunEditorFunction ( Variable name, Variable a0, Variable a1, Variable a2, Variable a3 ) #

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

Arguments

Return value

Editor script function return value.

Variable RunEditorFunction ( Variable name, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4 ) #

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

Arguments

Return value

Editor script function return value.

Variable RunEditorFunction ( Variable name, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5 ) #

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

Arguments

Return value

Editor script function return value.

Variable RunEditorFunction ( Variable name, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5, Variable a6 ) #

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

Arguments

Return value

Editor script function return value.

Variable RunEditorFunction ( Variable name, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5, Variable a6, Variable a7 ) #

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

Arguments

Return value

Editor script function return value.

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.

Variable RunEditorFunction ( int id, 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.
  • Variable a0 - First argument.

Return value

Editor script function return value.

Variable RunEditorFunction ( int id, Variable a0, 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.
  • Variable a0 - First argument.
  • Variable a1 - Second argument.

Return value

Editor script function return value.

Variable RunEditorFunction ( int id, Variable a0, Variable a1, 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.
  • Variable a0 - First argument.
  • Variable a1 - Second argument.
  • Variable a2 - Third argument.

Return value

Editor script function return value.

Variable RunEditorFunction ( int id, Variable a0, Variable a1, Variable a2, 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.
  • Variable a0 - First argument.
  • Variable a1 - Second argument.
  • Variable a2 - Third argument.
  • Variable a3 - Fourth argument.

Return value

Editor script function return value.

Variable RunEditorFunction ( int id, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4 ) #

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

Arguments

Return value

Editor script function return value.

Variable RunEditorFunction ( int id, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5 ) #

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

Arguments

Return value

Editor script function return value.

Variable RunEditorFunction ( int id, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5, Variable a6 ) #

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

Arguments

Return value

Editor script function return value.

Variable RunEditorFunction ( int id, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5, Variable a6, Variable a7 ) #

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

Arguments

Return value

Editor script function return value.

virtual Variable RunSystemFunction ( Variable name ) =0#

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

Arguments

  • Variable name - Name of the system script function.

Return value

System script function return value.

Variable RunSystemFunction ( Variable name, Variable a0 ) #

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

Arguments

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

Return value

System script function return value.

Variable RunSystemFunction ( Variable name, Variable a0, Variable a1 ) #

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

Arguments

Return value

System script function return value.

Variable RunSystemFunction ( Variable name, Variable a0, Variable a1, Variable a2 ) #

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

Arguments

Return value

System script function return value.

Variable RunSystemFunction ( Variable name, Variable a0, Variable a1, Variable a2, Variable a3 ) #

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

Arguments

Return value

System script function return value.

Variable RunSystemFunction ( Variable name, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4 ) #

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

Arguments

Return value

System script function return value.

Variable RunSystemFunction ( Variable name, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5 ) #

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

Arguments

Return value

System script function return value.

Variable RunSystemFunction ( Variable name, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5, Variable a6 ) #

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

Arguments

Return value

System script function return value.

Variable RunSystemFunction ( Variable name, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5, Variable a6, Variable a7 ) #

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

Arguments

Return value

System script function return value.

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.

Variable RunSystemFunction ( int id, 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.
  • Variable a0 - First argument.

Return value

System script function return value.

Variable RunSystemFunction ( int id, Variable a0, 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.
  • Variable a0 - First argument.
  • Variable a1 - Second argument.

Return value

System script function return value.

Variable RunSystemFunction ( int id, Variable a0, Variable a1, 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.
  • Variable a0 - First argument.
  • Variable a1 - Second argument.
  • Variable a2 - Third argument.

Return value

System script function return value.

Variable RunSystemFunction ( int id, Variable a0, Variable a1, Variable a2, 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.
  • Variable a0 - First argument.
  • Variable a1 - Second argument.
  • Variable a2 - Third argument.
  • Variable a3 - Fourth argument.

Return value

System script function return value.

Variable RunSystemFunction ( int id, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4 ) #

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

Arguments

Return value

System script function return value.

Variable RunSystemFunction ( int id, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5 ) #

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

Arguments

Return value

System script function return value.

Variable RunSystemFunction ( int id, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5, Variable a6 ) #

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

Arguments

Return value

System script function return value.

Variable RunSystemFunction ( int id, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5, Variable a6, Variable a7 ) #

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

Arguments

Return value

System script function return value.

virtual Variable RunWorldFunction ( Variable name ) =0#

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

Arguments

  • Variable name - Name of the world script function.

Return value

World script function return value.

Variable RunWorldFunction ( Variable name, Variable a0 ) #

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

Arguments

Return value

World script function return value.

Variable RunWorldFunction ( int id, 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.
  • Variable a0 - Argument

Return value

World script function return value.

Variable RunWorldFunction ( Variable name, Variable a0, Variable a1 ) #

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

Arguments

Return value

World script function return value.

Variable RunWorldFunction ( Variable name, Variable a0, Variable a1, Variable a2 ) #

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

Arguments

Return value

World script function return value.

Variable RunWorldFunction ( Variable name, Variable a0, Variable a1, Variable a2, Variable a3 ) #

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

Arguments

Return value

World script function return value.

Variable RunWorldFunction ( Variable name, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4 ) #

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

Arguments

Return value

World script function return value.

Variable RunWorldFunction ( Variable name, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5 ) #

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

Arguments

Return value

World script function return value.

Variable RunWorldFunction ( Variable name, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5, Variable a6 ) #

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

Arguments

Return value

World script function return value.

Variable RunWorldFunction ( Variable name, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5, Variable a6, 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.

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.

Variable RunWorldFunction ( int id, Variable a0, 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.
  • Variable a0 - First argument.
  • Variable a1 - Second argument.

Return value

World script function return value.

Variable RunWorldFunction ( int id, Variable a0, Variable a1, 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.
  • Variable a0 - First argument.
  • Variable a1 - Second argument.
  • Variable a2 - Third argument.

Return value

World script function return value.

Variable RunWorldFunction ( int id, Variable a0, Variable a1, Variable a2, Variable a3 ) #

Arguments

Return value

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

Variable RunWorldFunction ( int id, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4 ) #

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

Arguments

Return value

World script function return value.

Variable RunWorldFunction ( int id, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5 ) #

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

Arguments

Return value

World script function return value.

Variable RunWorldFunction ( int id, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5, Variable a6 ) #

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

Arguments

Return value

World script function return value.

Variable RunWorldFunction ( int id, Variable a0, Variable a1, Variable a2, Variable a3, Variable a4, Variable a5, Variable a6, Variable a7 ) #

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

Arguments

Return value

World script function return value.

void Shutdown ( ) #

Deletes the pointer to the existing engine instance.

virtual void Iterate ( ) =0#

Engine iterate function (update, render, swap). This function must be called every frame.

void StartFps ( ) #

Starts the FPS counter if it was stopped. All function calls are placed into a stack, so the number of calls to this function should correspond to the number of calls to the stopFps() function.

void StopFps ( ) #

Stops the FPS counter. This function should be called if application window is hidden or some heavy non-rendering tasks are processing. All function calls are placed into a stack, so the number of calls to this function should correspond to the number of calls to the startFps() function.

int GetVideoContextFlags ( ) #

Returns the current video context flags.

Return value

A set of current video context flags as an integer value.

IntPtr 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, IntPtr 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.
  • IntPtr 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

void Quit ( ) #

The Engine requests to exit the application.
Last update: 2023-01-11
Build: ()