BepInEx 6.0.0-pre.1
BepInEx is a universal Unity plugin framework which aims to provide a unified overlayed environment for different Unity games. It allows for runtime code modifications and has been widely used in modding various games.
Setup:
– Download the latest version that is compatible with Cities Skylines 2 (Use the Mono version).
– Extract the contents to the root directory of Cities Skylines 2.
– Run the game once to ensure that BepInEx initializes and creates its config folder.
NOTE: This is a pre-release of a major version of BepInEx. BepInEx 5 plugins will not work with this release yet.
About upgrading
This release is mainly meant for those who use current Bleeding Edge builds to mod Il2Cpp games. If you want to use this release, follow this upgrade guide:
– If you use BepInEx 5: Stay on BepInEx 5! The current pre-release does not support loading BepInEx 5 plugins, and there are many issues.
– If you use BepInEx Bleeding Edge builds (builds 577 and lower): It is recommended that you upgrade to this pre-release to ensure all your plugins keep working. All builds after 6.0.0-be.577 will not be compatible with newer BE builds. To upgrade, simply download the appropriate ZIP below and replace your old files with the new ones.
– If you want to mod new Unity Mono games: Consider using BepInEx 5! The API is still stable, and BepInEx 6 will eventually include support for loading BepInEx 5 plugins!
– If you want to mod new Il2Cpp games: Consider using Bleeding Edge builds! Builds after 6.0.0-be.577 use updated tooling and .NET 6 for Il2Cpp. This pre-release is mainly meant for those who already have existing Il2Cpp plugins and can’t upgrade at the moment.
Changelog
The changelog is concerning BepInEx 5
New features
– The project was restructured massively to allow extensibility to new game engines and runtimes.
– – BepInEx.dll was renamed to BepInEx.Core.dll.
– – BepInEx.Preloader.dll was renamed to BepInEx.Preloader.Core.dll.
– – Code to support Unity Mono games was moved to BepInEx.Unity.dll and BepInEx.Preloader.Unity.dll.
– Added official support for new runtimes:
– – Unity Il2Cpp: an ahead-of-time compilation tool used by Unity.
– – .NET Framework for games that use .NET game engines (e.g. XNA, MonoGame).
– – .NET Core for games that use .NET Core-based engines (e.g. Silk).
– Added new attribute-based preloader patch syntax (Example).
– Plugin versions are now required to follow semver 2.0.0.
– – The x.y.z.w form will still be accepted, but the w part will be ignored for all but logging purposes.
– Allow piping BepInEx console to Unix terminal on Wine as well.
API improvements
– BepInDependency now supports specifying version ranges for the dependencies using npm version range syntax.
– ManualLogSource now includes overloads for interpolated string handlers to improve logging performance.
– ConfigEntryBase constructor is now marked as protected to allow use in custom config entries.
– ConfigFile.Values is now marked as public for consistency with ConfigFile.Keys property.
Dependency upgrades, new dependencies
– Updated HarmonyX to 2.10.0
– Updated MonoMod to 22.5.1.1
– Il2Cpp: Added Cpp2IL
– Il2Cpp: Added fork of Il2CppAssemblyUnhollower
– Il2Cpp: Added fork of mono runtime
Fixes
– Fixed crashes on Unity 4 games caused by ThreadingHelper
– Improved console output on Unix (both Wine and native Unix games)
– Improved file logging especially for concurrent game runs
– Fixed multiple BepInEx instances running the chainloader at the same time
– Optimized log source and log listener event handling
– Fixed possible crashes when trying to query for Unity version
– Fixed not detecting plugins with indirect BepInEx reference
– Improved logging for plugin dependency loading errors
– Fixed possible console-related crashes in Wine
– Fixed game crashes when a console cannot be allocated on Windows
Deprecations and other housekeeping
– Removed BepInEx.Patcher (hardpatcher for mono and .NET games)
– Upgraded all projects to the new csproj format
– Removed all submodules in favour of using NuGet to manage external dependencies
– Removed all Harmony version wrappers
– Removed the deprecated BepInEx.Harmony assembly
– Improved ZIP naming to include consistent OS and Architecture identifiers