Engine Functions
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.
See Also#
Analogues of C++ runWorldFunction() methods are described in the engine.world class reference.
Analogues of C++ runEditorFunction() methods are described in the engine.editor class reference.
Analogues of C++ runSystemFunction() methods are described in the engine.system class reference.
Engine Class
Members
static bool isInitialized() const#
Return value
true if the Engine is initialized; otherwise false.static getAppPath() const#
Return value
Current path to a directory where binary executable file is stored.static getDataPath() const#
Return value
Current path to the data directory.static getHomePath() const#
Return value
Current path to the user's home directory.static getSavePath() const#
Return value
Current path to a directory with the default configuration file, saved files, etc.static getCachePath() const#
Return value
Current path to the directory with cached files.static int getNumPluginPaths() const#
Return value
Current number of the specified paths to directories with plugins.static getSystemScript() const#
Return value
Current path to the system script.static getSystemCache() const#
Return value
Current path to the system script cache.static getEditorCache() const#
Return value
Current path to the editor script cache.static getVideoApp() const#
Return value
Current graphics API used for rendering.static getSoundApp() const#
Return value
Current sound API used.static getExternDefine() const#
Return value
Current list of external definitions.static getFeatures() const#
Return value
Current list of features like OpenGL, Direct3D, Microprofile, Geodetic, etc.static getVersion() const#
Return value
Current engine version info.static void setBackgroundUpdate ( Engine.BACKGROUND_UPDATE update ) #
Arguments
- Engine.BACKGROUND_UPDATE update - The value indicating whether the application window is updated when the window is hidden or out of focus (rendering frames in background).
static Engine.BACKGROUND_UPDATE getBackgroundUpdate() const#
Return value
Current value indicating whether the application window is updated when the window is hidden or out of focus (rendering frames in background).static isActive() const#
Return value
Current the engine is activestatic isFocus() const#
Return value
Current the Engine window is focusedstatic isQuit() const#
Return value
Current the engine is quittingstatic float getTotalTime() const#
Return value
Current total time value, in milliseconds.static float getTotalCPUTime() const#
Return value
Current total CPU time value, in milliseconds.static float getUpdateTime() const#
Return value
Current update phase duration value, in milliseconds.static float getRenderTime() const#
Return value
Current rendering time value, in milliseconds.static float getPresentTime() const#
Return value
Current time value, in milliseconds.static float getInterfaceTime() const#
Return value
Current time value, in milliseconds.static int64_t getFrame() const#
Return value
Current engine frame number.static float getFps() const#
Return value
Current value of the Engine FPS counter.static float getIFps() const#
Return value
Current inverse value of the Engine FPS counter (1/FPS).static float getStatisticsFpsMin() const#
Return value
Current minimum FPS counter value for the last 600 frames.static float getStatisticsFpsAvg() const#
Return value
Current average FPS counter value for the last 600 frames.static float getStatisticsFpsMax() const#
Return value
Current maximum FPS counter value for the last 600 frames.static isMainThread() const#
Return value
Current the current thread is mainstatic Player getMainPlayer() const#
Return value
Current main player.static isEvaluation() const#
Return value
Current the evaluation version of the Engine is usedstatic int getNumEditorLogics() const#
Return value
Current number of EditorLogic instances.static int getNumWorldLogics() const#
Return value
Current number of WorldLogic instances.static int getNumSystemLogics() const#
Return value
Current number of SystemLogic instances.static int getNumArgs() const#
Return value
Current number of command line arguments.static int getNumPlugins() const#
Return value
Current number of loaded plugins.static getPrecision() const#
Return value
Current precision type.static Event getEventFocusLost() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventFocusGained() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndSwap() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndDeleteObjects() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginDeleteObjects() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndPluginsSwap() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginPluginsSwap() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndWorldSwap() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginWorldSwap() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndPathfinding() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginSwap() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndRender() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndPostRender() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginPostRender() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndPluginsGui() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginPluginsGui() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndRenderWorld() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginRenderWorld() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndPluginsRender() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginPluginsRender() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndEditorRender() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginEditorRender() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginRender() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndVRRender() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginVRRender() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventAsyncEndFramePhysics() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventAsyncBeginFramePhysics() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventSyncEndFramePhysics() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventSyncBeginFramePhysics() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginPathfinding() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndFilesystemUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginFilesystemUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndSpatialUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginSpatialUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndPluginsPostUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginPluginsPostUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndEditorPostUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginEditorPostUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndSystemLogicPostUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginSystemLogicPostUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndSystemScriptPostUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginSystemScriptPostUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndWorldPostUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginWorldPostUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndAnimationManagerUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginAnimationManagerUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndWorldUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginWorldUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndSystemLogicUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginSystemLogicUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndSystemScriptUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginSystemScriptUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndEditorUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginEditorUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndVRUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginVRUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndPluginsUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginPluginsUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndSoundsUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginSoundsUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndExpressionUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginExpressionUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndRenderUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginRenderUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndGameUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginGameUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndSoundManagerUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginSoundManagerUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndWorldManagerUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginWorldManagerUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndControlsUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginControlsUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndInputUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginInputUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventEndPropertiesUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginPropertiesUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.static Event getEventBeginUpdate() const#
The event handler signature is as follows: myhandler()Usage Example
Return value
Event reference.virtual engine.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.static engine.getLibraryModulePath ( ) #
Returns a path to the Engine's dynamic library file.Return value
Path to the Engine's dynamic library file.virtual engine.getArg ( int num ) =0#
Returns the command-line argument by its index.Arguments
- int num - Index of the argument.
Return value
Command-line argumentengine.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.void engine.dialogError ( string title ) #
Displays a dialog window with errors set using the error() function.Arguments
- string title - Title to be displayed in the error window.
void engine.dialogMessage ( string title ) #
Displays a dialog window with the last message set using the message() function.Arguments
- string title - Title to be displayed in the message window.
void engine.error ( string format, ... values ) #
Adds a text describing an error to the list of errors.Arguments
- string format - Format of the error text. See the formatting string description.
- ... values - Arguments, multiple allowed.
void engine.message ( string format, ... values ) #
Adds a new message to the list of messages.Arguments
- string format - Format of the message text. See the formatting string description.
- ... values - Arguments, multiple allowed.