Repository navigation
Conversation
Loads prefabs and sprites from plain AssetBundles and serves them through ResourceControl's loaders. Supersedes WorldPrefabManager, which is removed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Segually
marked this pull request as ready for review
October 1, 2026 13:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
AssetBundleManager, which lets mods ship plain (non-Addressables) AssetBundles and have the game load prefabs and sprites from them.The game streams every runtime asset through
ResourceControl's loaders using Addressables keys, so a plain bundle is invisible to it. This manager registers a bundle and patches the concrete loader entry points so that, when a requested key belongs to a registered bundle, the asset is served from that bundle instead.Covered paths:
AsyncInstantiateEquipment)AsyncInstantiateHouseInterior)AsyncInstantiateWorldObjectPrefab)LoadAndAssignSprite)The synchronous AssetBundle APIs are stripped in this il2cpp build, so the manager stages the raw bytes to disk, loads with
LoadFromFileAsync, and pre-loads assets withLoadAssetAsync. Mods only hand over the bytes.Changes
Assets/Assets.Systems.cs(AssetBundleManager,ModBundle) andAssets/Assets.Patches.cs(Harmony patches).Base.GamePlugin.cs: initializeAssetBundleManagerin place ofWorldPrefabManager.Items/Items.WorldPrefab.cs(WorldPrefabManager).AssetBundleManagercovers the sameAsyncInstantiateWorldObjectPrefabpaths, so keeping both would patch the same methods twice. The doc comment inGui.Systems.csthat referencedWorldPrefabManagernow points atAssetBundleManager. Mods that callWorldPrefabManager.Registerwill need to move to the new API, so this is a breaking change worth a look.Notes
.gitignore) are independent of this one. The only overlap is a one-line init registration inBase.GamePlugin.cs, which may need a trivial conflict resolution depending on merge order.main.🤖 Generated with Claude Code