.. contents:: Table of Contents .. _plugin: Plugin ====== **Create new plugin** is possible and here I intend to list **how to**. Some of the files that you need to know when you are creating a new plugin are: +-----------------------------+----------------------------------+---------------------------------------+ | | name | | location | | information | +=============================+==================================+=======================================+ | require_embedded.cpp | | ``src/lua-wrap/`` | | Mostlly for Android | +-----------------------------+----------------------------------+---------------------------------------+ | plugin-callback.h | | ``include/core_mbm/`` | | Callback implementation for plugin | +-----------------------------+----------------------------------+---------------------------------------+ | | plugin-helper.h | | ``plugins/plugin-helper/`` | | API to use inside of the plugin | | | user-data-lua.h | | | | | +-----------------------------+----------------------------------+---------------------------------------+ | | class-identifier.h | | ``include/core_mbm/`` | | You should use L_USER_TYPE_PLUGIN | | | class-identifier.cpp | | | | Or you can define your own | +-----------------------------+----------------------------------+---------------------------------------+ .. Note:: For a complete example of a plugin with full Lua API documentation, see the :ref:`steam ` plugin. .. Important:: Since :guilabel:`Android 7.0`, the system prevents apps from dynamically linking against non-NDK libraries. Reference: https://developer.android.com/about/versions/nougat/android-7.0-changes.html#ndk For this reason, it is specified the dependency libraries in :guilabel:`Android` build. In our existent plugins, we specify some flags to include them... if you want to use :guilabel:`box2d` in :guilabel:`Android` you must to include the flag ``-DUSE_BOX2D=1`` when invoking :guilabel:`Cmake`. More details in :ref:`Android dependencies `. I recommend to do the same for your new plugins.