Skip to content

Fixed Asset Bundles not working in Unity 6.#1122

Open
Javialonqv wants to merge 2 commits intoLavaGang:alpha-developmentfrom
Javialonqv:asset-bundles-fix
Open

Fixed Asset Bundles not working in Unity 6.#1122
Javialonqv wants to merge 2 commits intoLavaGang:alpha-developmentfrom
Javialonqv:asset-bundles-fix

Conversation

@Javialonqv
Copy link

This fixes Il2CppAssetBundleManager and Il2CppAssetBundle not working in Unity 6 by doing the following:

  • Fixing the signatures for the delegates, since now Unity 6 icalls have the _Injected postfix.
  • Adding extra delegates for functions where the parameters changed in Unity 6.
  • Handling functions where the resulting pointer is actually a GCHandle and not the object itself (due to the new Unity 6 marshalling API).
  • When loading an asset bundle, getting the actual bundle pointer by getting the objects' cachedPtr.
  • Added AssetRipper.Primitives as a reference to Il2CppAssetBundleManager.csproj so we detect the Unity version that's being used, and then apply the changes depending of the version.

Tested in Unity Versions:

  • 2022.3.62f2
  • 6000.3.10f1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant