- Home /
AssetBundle.LoadAsync() and Code Stripping
We need to reduce the memory consumption of our title, initially for iOS and then later for Android.
One of the areas we're looking at is code stripping as suggested in the article Optimizing the Size of the Built iOS Player.
Testing the various stripping levels, assemblies and byte code, we are experiencing a crash at runtime. I have narrowed this down to using the AssetBundle.LoadAsync()
method, replacing its usage with AssetBundle.Load()
calls. Whilst this is has stopped the crash, it has severely broken parts of the game that at this late stage we don't have the time to repair.
So, taking a step back - the code stripping is removing a dependency of AssetBundle.LoadAsync()
that causes the game to crash at runtime. In the linked article it says to use a link.xml
file to specify additional dependencies (I've had to add System.Security.Cryptography
to this list).
Q: What are the dependencies required for AssetBundle.LoadAsync()
?
Also, are there any tips for working out dependencies? I had a peek in .NET Reflector however that didn't yield much information as it just calls an external DLL.
Have you solved this problem? I've encountered exactly same problem, In my case, I can't use LoadlevelAsync to load strea$$anonymous$$g scenes. Just curious....