top of page

Unity Asset Bundle 11 Jan 2019: Step-by-Step Tutorial on How to Use AssetBundles in Unity

  • exemparakahta
  • Aug 14, 2023
  • 1 min read


We just ran into this same issue in 2018.3.0b8. After exhausting a bunch of other theories, I tried checking for this "fixed" bug and it resolved the issue. The game (or editor) would crash whenever we loaded a mesh from an asset bundle that had medium mesh compression enabled. We were also getting loads of assertion failures in the logs (Assertion failed on expression: 'meshVD.GetDataPtr() == NULL'). Disabling mesh compression, while not ideal, got rid of the assertions and the crash.


At run-time I download a Unity asset bundle from the internet that contains a bunch of prefabs. Then i want to use PhotonNetwork.InstantiateSceneObject to Instantiate some of the prefabs, but this function only accepts a prefab name string, but all the prefabs are inside the asset bundle and only accessible if you first load the object as a prefab, and then instantiate it. You cant Instantiate it as a string name directly like you would if it was in the Resource folder.




Unity Asset Bundle 11 Jan 2019




The chinese version of Unity has its own inbuild option to encrypt AssetBundles/BundleFiles. As it's a feature of Unity itself, and not a game specific protection, it is included in UnityPy as well.To enable encryption simply use UnityPy.set_assetbundle_decrypt_key(key), with key being the value that the game that loads the budles passes to AssetBundle.SetAssetBundleDecryptKey. 2ff7e9595c


 
 
 

Recent Posts

See All

Comments


!
Widget Didn’t Load
Check your internet and refresh this page.
If that doesn’t work, contact us.

©2023 by Chocolate de rêves. Proudly created with Wix.com

bottom of page