Skip to content

About

Official MC2IL plugin that separates recovered Mirror Weaver networking code into partial C# files.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MC2IL Mirror Serialized Recovery

An official MC2IL plugin that separates Mirror Weaver code from recovered Unity gameplay scripts. It keeps the gameplay types readable and writes the generated networking members into partial C# files.

Download the latest plugin DLL

Install

  1. Download MC2IL.MirrorSerializedRecovery.dll from Releases.
  2. Copy it into the Plugins folder beside the MC2IL executable.
  3. Confirm that mirror-serialized-recovery appears in the output formats.
.\MC2IL.exe --list-output-formats

The DLL embeds Roslyn and its private dependencies. MC2IL provides the shared host assemblies. To load the DLL from another folder, pass --plugins-dir <folder>.

Export C# with Mirror sidecars

.\MC2IL.exe --game-path "C:\Games\Example.apk" --output-as mirror-serialized-recovery --output-to "C:\Output\MirrorRecovery"

The plugin prefers Assembly-CSharp. If that assembly is absent, it selects assemblies containing Mirror.NetworkBehaviour subclasses.

Output Contents
CSharp/Assembly-CSharp/ Gameplay scripts, SyncVar fields, and attributed Command and RPC wrappers
CSharp/Assembly-CSharp/MirrorSerialization/ Partial files with generated SyncVar serializers, accessors, RPC handlers, and registration code

The plugin recognizes common Weaver patterns for SerializeSyncVars, DeserializeSyncVars, UserCode_*, and InvokeUserCode_*. It repairs serializer arguments and rebuilds dispatchers when the recovered method yields a unique match. It keeps ambiguous methods in their original form.

Build from source

Install the .NET 10 SDK. Clone the plugin and the MC2IL host source into sibling directories. Build against the host revision you intend to run. Version 1.0.0 was tested with MC2IL revision 1b7e5e2.

dotnet build MC2IL.MirrorSerializedRecovery.csproj -c Release

For a host checkout in another location, pass -p:MC2ILSourceDir="C:/src/MC2IL". The Release build writes the single plugin DLL to dist/.

Releases

A version tag such as v1.0.0 triggers the release workflow. It builds the plugin, verifies that MC2IL registers the output format, and attaches the DLL and its SHA-256 checksum to the GitHub release.

License

MIT. The bundled dependencies and loader are covered by the notices in LICENSES.

About

Official MC2IL plugin that separates recovered Mirror Weaver networking code into partial C# files.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages