Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Unity - Convert CustomAssetBundles to WebPayer (.unity3d), OR prefab extraction?

Featured Replies

  • Author
  • Localization

ruprecht, posted Sat Jan 16, 2021 3:47 am (61687)


I'm new to QuickBMS and will soon be spending time learning how it and the couple of Unity-related scripts work, but in the meantime I thought I would pose the questions here and possibly save myself some work.

So I'm stuck using Unity 3.2 in trying to modify an existing product. The assets are in the format of cached webplayer files, having filenames similar to 'CustomAssetBundle-376a9dc2d037e414a8ababbaccc4f396'. I would like to either be able to directly convert these file into the compressed webplayer assetbundle format which have extension .unity3d ...... or as an alternative, if I can make QuickBMS extract prefab assets along with the other assets it already supports, I can recreate the assetbundles myself from the extracted source assets.

I have already tried tools such as DevX Unpacker....most of these tools either do not support prefab extraction, or they do not support asset formats as old as Unity 3.2

I would appreciate any helpful comments.....if what I would like to do is impossible with QuickBMS, I would like to know before I invest a lot of time figuring out how to use this tool.


Update: I played around with QuickBMS and the unity webplayer script. Extraction works great, but what I really need is to be able to go the other direction....so I tried the reimport batch file. And then I got this error: "Error: script invalid for reimporting, it uses MEMORY_FILEs". So I guess I can't use the webplayer script to reimport, but surely there must be a way to convert from CustomAssetBundle back to the .unity3d format.
  • Author
  • Localization

ruprecht, posted Tue Jan 19, 2021 3:38 am (61739)


No one was forthcoming with any assistance, so I managed to write my own solution with QuickBMS scripts. There may have been a cleaner way to implement, but since I'm a noob with QuickBMS, I just went with what got me to the desired results faster.

I've attached the scripts and supporting files. You need to copy the quickbms.exe file into the same folder as the CAB2U3D.bat. To convert, just drag your CAB file onto the CAB2U3D.bat file.....the resulting converted file will be named out.unity3d

cab2u3d-.rar

  • Author
  • Localization

aluigi, posted Tue Feb 16, 2021 12:21 am (62276)


yeah reimporting is not possible because the whole archive is compressed instead of each single file as usually happens with other game archives.

In this case splitting the script in two separate scripts is a possible choice:
- script1 decompresses the archive
- script2 extracts the files

script2 can then used for reimporting while recompressing the archive is a bit more complicated and prone to errors (maybe the web player will refuse it).

Anyway it's good that you found a working solution.
Since you used lzma for the compression job, please note that quickbms supports recompressors too, example:
Code:
comtype lzma86head_compress
get SIZE asize
clog "new.dat" 0 SIZE SIZE
  • Author
  • Localization

ruprecht, posted Wed Mar 03, 2021 5:50 am (62637)


aluigi wrote:
...

Anyway it's good that you found a working solution.
Since you used lzma for the compression job, please note that quickbms supports recompressors too, example:
Code:
comtype lzma86head_compress
get SIZE asize
clog "new.dat" 0 SIZE SIZE


Thanks for the info. Yes, I figured there probably was some kind of internal lzma compression function available, but I figured that it would be quicker for me to just use the command line version rather than spend more time trying to figure out how to make the internal one work correctly. As I mentioned earlier, I was just trying to get the job finished ASAP, wasn't so concerned about making things perfect. ;)
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.