Installation
npm install @balancy/core
Development Notes
Build
npm run build # build core + webview, then copy to Unity plugin
npm run build:core # build core only
npm run build:webview # build webview + copy to Unity plugin
Unity Plugin Copy Path
The copy:webview:force script copies the built WebView bundle to the sibling plugin_cpp_unity repo:
plugin_cpp_typescript/packages/core/ --> plugin_cpp_unity/WebView/Resources/WebGL/
This expects plugin_cpp_unity to be cloned as a sibling of plugin_cpp_typescript:
Projects/
plugin_cpp_typescript/ <-- this repo
plugin_cpp_unity/ <-- Unity plugin repo (sibling)
The copy is skipped in CI (CI=true). Locally, it runs automatically after build:webview.
Previously this path was hardcoded to Pavel's Mac (/Volumes/PavelData/Projects/...). It now uses a relative path and cross-platform Node.js fs.copyFileSync instead of cp, so it works on Windows (cmd.exe, PowerShell), macOS, and Linux.