crumb-jp: Binary Surgery for a Better Breadboard
How a simple Japanese translation patch for a circuit simulator evolved into a sophisticated Unity binary injector and custom Windows installer.
- CRUMB's user interface is locked inside proprietary Unity binary assets, forcing the localization effort to abandon standard text files for custom binary injection.
- The patcher uses AssetsTools.NET to perform a header-preserving swap, replacing XAML payloads within standard Unity binaries without corrupting the game state.
- A custom WiX-based installer abstracts away the complex C# tooling, automatically locating Steam directories to provide a consumer-grade user experience.
- By over-engineering the delivery mechanism, the project lowers the barrier to entry for Japanese students exploring electronics simulation.
The Translation Illusion
Most users assume translating a game is a trivial exercise in text editing. You open a JSON or localization file, swap the English strings for Japanese ones, and restart the application. For the high-fidelity electronic circuit simulator CRUMB, this path was entirely blocked.
CRUMB bakes its Avalonia-style XAML user interface directly into compiled Unity binary assets. The text strings do not live in an accessible folder. They are serialized as MonoBehaviour data inside a massive proprietary blob called sharedassets0.assets. To change a single button from English to Japanese, you have to break open the compiled binary and rewrite the file.
The Header-Preserving Swap
To solve this, the author built a custom C# utility called AssetPatcher. This tool acts as a binary scalpel. It relies on the AssetsTools.NET library to safely parse Unity files without requiring the Unity Editor.
The patcher iterates through the binary blob looking for specific MonoBehaviour assets that contain XAML UI definitions. When it finds one, it performs a delicate operation. It identifies the exact byte offset where the XAML payload begins. It preserves the fragile Unity metadata header above that line, splices in the new Japanese XAML string, and recalculates the file sizes.
A White-Glove Installation
Mods requiring binary injection usually ship with a set of terrifying command-line instructions. Users are told to back up their own files and run opaque scripts. The crumb-jp project rejects this paradigm entirely.
The author built a robust Windows setup package using the WiX Toolset. It includes custom C# actions that automatically scan the Windows registry to locate the Steam library path. It finds the game installation, backs up the original assets, and silently runs the binary injector behind a standard progress bar.
Bridging the STEM Gap
Why build a sophisticated binary patching pipeline and a custom installer just to translate a breadboard simulator? The answer lies in the educational value of the software itself. CRUMB is a powerful tool for learning electronics safely.
By writing custom C# tooling to bypass Unity's compiled asset limitations, the author ensured that language is no longer a barrier for Japanese students exploring STEM concepts.