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.

Reimport .unity3d package

Featured Replies

  • Author
  • Localization

iji, posted Sun Aug 19, 2018 2:04 am (37653)


Hello, I used quickbms with this script http://aluigi.altervista.org/papers/bms ... player.bms to extract a unity webplayer file, everything worked flawlessly, however I can't reimport modified files to the package (tried a lot of stuff, like -r -r)

Can anyone help me out? Thanks a lot
  • Author
  • Localization

aluigi, posted Mon Aug 20, 2018 2:16 pm (37710)


The script can't be used for reimporting because it uses a memory file, basically it makes 2 jobs in one script: decompressing the archive and extracting the files from the decompressed archive.
Splitting the script in 2 parts may work but the uncompressed archive will not be loaded by the game because it has no headers so then you should "reimport" it too back in the original unity3d file... it's prone to problems.
  • Author
  • Localization

iji, posted Mon Aug 20, 2018 3:35 pm (37715)


Can replacing the old file with a new smaller file and recompressing the archive work?

Just so I can understand, is compressing the archive again a problem?
  • Author
  • Localization

aluigi, posted Tue Aug 21, 2018 3:24 am (37733)


The answer to both the question is that it "may" be a problem and may not work.

I have splitted the script for you:

Script 1:
Code:
endian big
comtype lzma86head
idstring "UnityWeb"
get DUMMY long
get VER1 byte
get VER2 string
get VER3 string
get SIZE long
get DUMMY short # not supported at the moment
get OFFSET short

get DUMMY long
get ENTRIES long
for i = 0 < ENTRIES # last entry remain saved
    get ZSIZE long
    get SIZE long
next i
get LAST_OFFSET long
get DUMMY byte

get NAME filename
string NAME = "_unpacked"
clog NAME OFFSET ZSIZE SIZE

Script 2:
Code:
get PATH filename
get FILES long
for i = 0 < FILES
    get NAME string
    get OFFSET long
    get SIZE long
    set FNAME string PATH
    string FNAME = /
    string FNAME = NAME
    log FNAME OFFSET SIZE
next i


Extraction: script 1 script 2
Reimporting: script 2 script 1

It may be chaotic due to the presence of 2 scripts and 2 files but try it and if you are lucky it will work but the risk the game will refuse the edited archive is very high.
Let me know your results, that's the max I can do.
  • Author
  • Localization

iji, posted Tue Aug 21, 2018 7:32 am (37739)


Thanks for the answer, however i'm getting "incomplete input file" error because of "clog NAME OFFSET SIZE SIZE" what does that line do?
I'm supposed to concatenate the two scripts right? Or can I input two scripts in quickbms?
  • Author
  • Localization

aluigi, posted Tue Aug 21, 2018 11:45 am (37740)


My fault, I forgot a 'Z' in the ZSIZE of the first script
  • Author
  • Localization

iji, posted Tue Aug 21, 2018 9:15 pm (37753)


Thanks a lot I appreciate the help, however the script now throws this error:

Code:
Error: incomplete input file 0: file.unity3d
       Can't read 515880 bytes from offset 004021d0.
       Anyway don't worry, it's possible that the BMS script has been written
       to exit in this way if it's reached the end of the archive so check it
       or contact its author or verify that all the files have been extracted.
       Please check the following coverage information to know if it's ok.

  coverage file 0   187%   7881394    4202960    . offset 004021d0

Last script line before the error or that produced the error:
  34  log FNAME OFFSET SIZE


I tried tweaking the script myself without success
  • Author
  • Localization

aluigi, posted Wed Aug 22, 2018 12:40 pm (37770)


You must use script 2 on the file generated by script 1, obviously :D
  • Author
  • Localization

iji, posted Wed Aug 22, 2018 12:57 pm (37771)


I think there is a problem with the second script, the first one generate an unpacked file but the second give one 0 byte file and this error :

Code:
10   log FNAME OFFSET SIZE


Sorry for the annoyance :D
  • Author
  • Localization

aluigi, posted Thu Aug 23, 2018 1:17 am (37791)


Honestly I don't see any error.
It's just the original script splitted in 2 parts, if the original script worked then these 2 one work too.
Sorry.
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.