Files
EVEngine/examples/live2d-backend-plugin
Cursor Agentand西风逍遥游 adb38d28b0 feat(avatar,dialogue): morph bake, Live2D null/plugin, lip-sync, tween
Complete remaining VN module work: Mesh morph targets from Assimp with
GPU bake, built-in NullLive2DBackend plus plugin registration sample,
Dialogue typewriter lip-sync, and Avatar tween binding.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>
2026-08-09 13:21:17 +00:00
..

Live2D backend plugin skeleton

Shows how to replace the built-in NullLive2DBackend with a real Cubism Core runtime without changing game scripts.

Contract

  1. Implement eve::avatar::ILive2DBackend.
  2. Export a factory ILive2DBackend *createMyBackend().
  3. In eve_plugin_init, call:
eve::avatar::Avatar::registerLive2DBackend(&createMyBackend);
  1. Load the plugin before creating avatars:
plugins <- eve.Plugins()
plugins.load("./live2d_backend_plugin.so")  // .dylib / .dll
av <- avatar.newLive2DAvatar()
print(av.getLive2DBackendName())  // your backend name
av.loadLive2DModel("models/hiyori")

Cubism notes

  • Live2D Cubism SDK is proprietary; ship it in your own plugin / app binary.
  • Map Cubism parameters to setParameter / getParameter.
  • Map Cubism expression / motion JSON ids to setExpression / setMotion.
  • Optionally implement collectDrawItems to push textured quads into the 2D queue, or draw into a Canvas and expose a Texture to an Image avatar layer.

This example registers a Demo backend (in-memory parameters only) so the registration path can be smoke-tested without Cubism.

Build

Requires an installed EVEngine SDK (same as examples/native-plugin):

cmake -B build -DEVEngine_DIR=$PWD/../../dist/eve-sdk/linux-debug/cmake
cmake --build build