This page has been translated automatically.
Программирование
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::Plugin Class

Header:#include <UniginePlugin.h>

Unigine Plugin class allows loading a custom library dynamically at Unigine runtime.

Plugin Class

Members


virtual void * get_data()

Plugin data.

Return value

The plugin data.

virtual const char * get_name()

Plugin name.

Return value

The plugin name.

virtual int get_version() const

Plugin version.

Return value

Returns the Engine version.

virtual void destroy()

Plugin should contain this function if it directly uses any OpenGL or DirectX commands. It is used to reinitialize the graphics context. Engine calls this function when the video mode is changed or application is restarted (i.e. video_restart is called).

virtual void flush()

Engine calls this function before updating each physics frame.

virtual void gui()

Engine calls this function before gui each render frame.

virtual int init()

Engine calls this function on plugin initialization.

Return value

Returns 1 on success, or 0 if an error occurred.

virtual int loadWorld(const XmlPtr & xml)

Engine calls this function on world loading.

Arguments

  • const XmlPtr & xml - Xml smart pointer.

Return value

Returns 1 on success, or 0 if an error occurred.

virtual void render()

Engine calls this function before rendering each render frame.

virtual int restoreState(const StreamPtr & stream)

Engine calls this function on world restoring.

Arguments

  • const StreamPtr & stream - Stream smart pointer.

Return value

Returns 1 on success, or 0 if an error occurred.

virtual int saveState(const StreamPtr & stream)

Engine calls this function on world saving.

Arguments

  • const StreamPtr & stream - Stream smart pointer.

Return value

Returns 1 on success, or 0 if an error occurred.

virtual int saveWorld(const XmlPtr & xml)

Engine calls this function on world saving.

Arguments

  • const XmlPtr & xml - Xml smart pointer.

Return value

Returns 1 on success, or 0 if an error occurred.

virtual int shutdown()

Engine calls this function on plugin shutdown.

Return value

Returns 1 on success, or 0 if an error occurred.

virtual void swap()

Engine calls this function before swapping each render frame.

virtual void update()

Engine calls this function before updating each render frame.
Last update: 03.07.2017
Build: ()