Unity Integration Testing
This guide explains how to test the Unity integration during development. Use this when you’re working on Unity-related features or fixing bugs in the integration.
The Unity integration automatically obfuscates your game code during Unity builds. This testing setup lets you verify that changes work correctly without creating full Unity packages or your own Unity project.
Scripts
Located in src/BitMono.Unity/scripts/:
copy-to-test-project.bat/ps1- Copies files to test project & Generates .meta to disable CLI plugin import under Assets
Testing
Build CLI:
dotnet build src/BitMono.CLI/BitMono.CLI.csproj -c Release -f net462Run:
src/BitMono.Unity/scripts/copy-to-test-project.batOpen Unity:
test/BitMono.Unity.TestProject/Build to test
Testing Package Export
To verify that the .unitypackage export includes all required DLLs:
Follow steps 1-3 above to set up the test project
In Unity, go to BitMono > Test Export Package
Check the Console for output showing included files and DLL count
The package will be created at the repository root:
BitMono-Unity-vtest-Unity<version>.unitypackage
Expected output:
=== BitMono Package Export Test ===
Including 192 files from BitMono.CLI folder (164 DLLs)
Total assets to export: 198
Package exported successfully!
Size: ~8 MB
This menu item is only available in the source code (not in exported packages) since PackageExporter.cs is excluded from the .unitypackage.