Skinned Mesh Renderer Not Visible in IOS build Asset Bundle

Hi There,

I have been working with Asset Bundles from a long time on android, but recently I made IOS asset bundle and I got this weird bug, i.e. After downloading asset bundle on ios device, everything works perfectly, all canvas, sprites, mesh renderer, eveything loads and work perfectly, only those 3D models which uses skinned mesh renderer (as there is bone animation on those) are not visible.

Anyone out there or from unity itself please help. As unity is cross-platform, this kind of bug should never occur in first place.

1 Like

Is there a solution for this problem by now. Two years later and I struggle with a similar problem. In my case the app is crashing trying to load models with skinned mesh renderer.

Edit: Unchecking ā€œStrip Engine Codeā€ in the Player-Settings worked for me.

for me its not working. any other solution?

All features that are used by asset bundles must also be ā€œusedā€ by main game. This can be done by either providing link.xml listing scripting classes you don’t want to be stripped, or by having a dummy scene in game using those features.

Thank you. This was the answer I needed. I included a dummy scene in the build which contained a skinned mesh renderer and a cloth component. That made the skinned mesh component work but it kept stripping the cloth functionality. I created the list.xml and included the code below and it all worked.

<linker>
    <assembly fullname="UnityEngine.ClothModule" preserve="all"/>
</linker>

Added these line codes on link.xml but I still get issue: SkinMeshRenderer component on assetbundle is Stripped once build unity il2cpp.
Error on android:
Could not produce class with ID 137. This could be caused by a class being stripped from the build even though it is needed. Try disabling ā€˜Strip Engine Code’ in Player Settings.

Do you have any idea? @Aurimas-Cernius

If you compile your AssetBundles with BuildPipeline.BuildAssetBundles:

then you can avoid code stripping of types that are only used in your AssetBundles by passing the path to the main .manifest file in the BuildPlayerOptions structure that you pass to BuildPipeline.BuildPlayer()

The link.xml is another valid approach, that is what Addressables uses and can be setup manually as well for exactly this purpose. I’m not sure why it didn’t work for you Intoan123. The ā€œCould not produce class with ID 137ā€ error does indeed refer to SkinnedMeshRenderer (according to Unity - Manual: YAML Class ID Reference). So i would guess its something specific about the content that you put inside the file.