Callbacks

Chapters:

Any function from system, world or editor scripts can be called in a C++ code. UnigineScript functions that are called from an external code are known as callbacks. Via callbacks scripts can communicate with each other, as well as with the external application.

Callbacks support up to 4 arguments and can return a value of an arbitrary type.

See also

An example can be found in <UnigineSDK>/source/samples/Api/Scripts/Callbacks/ directory.

Callbacks Usage Example

C++ Side

To demonstrate how callbacks can be used, let's code the C++ part first. Here's code from your_project_name.cpp file: