-
Is it possible to extract the asset from the bundle and save as a separate asset file or in new (empty?) bundle, without changing anything in the asset itself? If so, how would I achieve that? Runtime, not in editor. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
BundleHelper.LoadAssetDataFromBundle can give you a byte array from a bundle
If you want to import into a new empty bundle, there's no way to generate one right now easily (there are slight variations between engine versions and they're laid out differently). If you still want to do it, I've told people to build a bundle with the same engine version as the game in the editor and then delete all the files with AssetsTools.NET or UABEA. That would give you a blank bundle with no files. Then you can open the bundle and immediately write it in AssetsTools.NET (using a BundleReplacer) to make a bundle with only that file. You should also pass the class database file (assetsManager.classFile) into the bundle write method to generate a type tree. |
Beta Was this translation helpful? Give feedback.
-
So, If I want to extract particular GameObject from bundle (with all its dependencies), I can do that with BundleHelper.LoadAssetDataFromBundle ? And than write that bytearray to a new asset file (or new prepared empty bundle, as per your answer) ? |
Beta Was this translation helpful? Give feedback.
-
Ok tnx, will try tomorrow. I might be back for additional help. |
Beta Was this translation helpful? Give feedback.
So, If I want to extract particular GameObject from bundle (with all its dependencies), I can do that with BundleHelper.LoadAssetDataFromBundle ? And than write that bytearray to a new asset file (or new prepared empty bundle, as per your answer) ?
Sorry, its all new to me :)