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 3d Assets files

Featured Replies

  • Author
  • Localization

spider91, posted Sat Apr 04, 2015 11:02 pm (4334)


spider91 wrote:
aluigi

.resS files normally are stored sounds without TOC. All the TOC information seems to be stored in .assets filewith the same name . Does your extract them?


I'm not pretty shure, but unity studio somehow extracts these files.
  • Replies 168
  • Views 17
  • Created
  • Last Reply

Top Posters In This Topic

  • Author
  • Localization

AlphaTwentyThree, posted Sat Apr 04, 2015 11:11 pm (4336)


spider91 wrote:
spider91 wrote:
aluigi

.resS files normally are stored sounds without TOC. All the TOC information seems to be stored in .assets filewith the same name . Does your extract them?


I'm not pretty shure, but unity studio somehow extracts these files.

Hm, there are TYPE 83 files in the assets files that correspond to the contents of the resS files but I can't make a connection to the individual offsets. I'll take another look at another example. Would be cool if it was actually possible to get the names.
  • Author
  • Localization

happyend, posted Sun Apr 05, 2015 3:27 am (4339)


unity studio not support Unity 5.0,Unity 5.0 Audio use fsb5 Format,.resource,there are TYPE 83,snd files in the assets files that correspond to the contents of the .resource files,Is there no way to get fsb filenames?

sample:
http://www14.zippyshare.com/v/yZWvg0eo/file.html
  • Author
  • Localization

AlphaTwentyThree, posted Sun Apr 19, 2015 11:45 am (4635)


Any news on this?
  • Author
  • Localization

AlphaTwentyThree, posted Sun Apr 19, 2015 11:48 am (4636)


Well... actually there is a solution to this - the "empty" .snd contain size and offset of the according resS file.
I'll see if I can implement it somehow... would be quite cool after all. :)
  • Author
  • Localization

AlphaTwentyThree, posted Sun Apr 19, 2015 12:38 pm (4640)


Here's a version that skips the .snd file if there is a corresponding file in the resS (paste in line 161):
Code:
   if EXT == ".snd"
      if SIZE == 0x18 # probably corresponding audio file in resS archive
         get ONAME filename
         string ONAME = ".resS"
         open FDSE ONAME 1 EXISTS
         if EXISTS == 1
            savepos MYOFF 0
            callfunction getresS 1
            goto MYOFF 0
         else
            log FNAME OFFSET SIZE 0
         endif
      endif
   else
      log FNAME OFFSET SIZE 0
   endif
  • Author
  • Localization

aluigi, posted Sun Apr 19, 2015 12:43 pm (4642)


Well done.
Let me know when everything is complete and tested (wait some days maybe) and then I will put everything in unity.bms
  • Author
  • Localization

AlphaTwentyThree, posted Sun Apr 19, 2015 1:42 pm (4644)


I just tested the script on multiple Unity games and noticed something: Not all the files inside the resS archives have corresponding .snd files inside the .assets file. That means that if you extract the .assets file, chances may be that not all the files from the resS are extracted. :\
  • Author
  • Localization

AlphaTwentyThree, posted Sun Apr 19, 2015 2:05 pm (4645)


Well, there's a pseudo-workaround which works in some cases:
- put each size/offset combination from a resS extraction in an array
- after the extraction of the main files, sort the array by offset
- test if there are any gaps
- if so, write the gaps to disk
Of course this doesn't take into account all cases where there are two or more files in one gap. We'd need yet ANOTHER workaround for this... I don't have the patience for this at the moment to be honest. ;) If somebody wants to give it a shot, please post your results here!
  • Author
  • Localization

AlphaTwentyThree, posted Sun Apr 19, 2015 8:00 pm (4657)


Ok, I've run some other tests. I made a mistake - the files actually DID extract correctly and completely.
I've included a little test to see if this is the case:
Code:
set SIZE_RESS 0
for i = 0 < FILES
...
   if EXT == ".snd"
      if SIZE == 0x18 # probably corresponding audio file in resS archive
         get ONAME filename
         string ONAME = ".resS"
         open FDSE ONAME 1 EXISTS
         if EXISTS == 1
            savepos MYOFF 0
            math a = 1
            callfunction getresS 1
            goto MYOFF 0
            math SIZE_RESS = SIZE2
         endif
      endif
   endif
open FDSE ONAME 0 EXISTS
   if EXISTS == 1
      get FSIZE asize
      if FSIZE == SIZE_RESS
         print "All sound files from resS extracted!"
      else
         print "Warning: unextracted data in resS!"
      endif
   endif
  • Author
  • Localization

AlphaTwentyThree, posted Mon Apr 20, 2015 8:46 am (4667)


Here's my latest version of the script. I changed the resS process a little bit so the script opens the file only one time and not each time it encounters an *.snd with 0x18 bytes. Else, I've changed the warning message at the end so you can see how many bytes of data from the resS stays unextracted. Sometimes it's just a few bytes of zeros between the files, so everything went fine.
I also added my type of naming as comments so everybody can decide which way they want to name the files. Explanation of my naming system: As I'm after the music I want to see from which source file the track comes from. As the files are opened consecutively in the game, I get a pseudo playing order.

Also, I selfishly raised the version to 0.2.0 because the step with the resS extraction is quite big. ;)

unity_0.2.0.zip

  • Author
  • Localization

hackspeedok, posted Mon Apr 20, 2015 10:13 am (4669)


AlphaTwentyThree wrote:
Here's my latest version of the script. I changed the resS process a little bit so the script opens the file only one time and not each time it encounters an *.snd with 0x18 bytes. Else, I've changed the warning message at the end so you can see how many bytes of data from the resS stays unextracted. Sometimes it's just a few bytes of zeros between the files, so everything went fine.
I also added my type of naming as comments so everybody can decide which way they want to name the files. Explanation of my naming system: As I'm after the music I want to see from which source file the track comes from. As the files are opened consecutively in the game, I get a pseudo playing order.

Also, I selfishly raised the version to 0.2.0 because the step with the resS extraction is quite big. ;)

Can you help me, i'm translating Gangster Vegas for ios
  • Author
  • Localization

AlphaTwentyThree, posted Mon Apr 20, 2015 10:18 am (4670)


I've just implemented the residual files extraction. However, the script extracts files in the post-processing that have already been extracted. I don't know why this is the case because I only write the spaces in-between the already-written files from the resS to disk. I know that there's an error because "[size of resS] - [size of extracted files by .assets index]" doesn't match "[size of residual files extracted in post-processing]". If somebody wants to take a look at the beta script, I've attached it. The function "retrieve" is new. It simply sorts the offset-size-pairs from the extraction process, tests if it is consistent and writes the data in-between. Don't be irritated by the function "diff_type", that's just so I wouldn't need to duplicate code when testing for sound type from the resS (needs to run during the main extraction as well as the post-processing).
Here's a sample pair where you can test the script on: http://*USE_ANOTHER_FILEHOSTING*/4411283 ... st_pair.7z
Any help?

unity_0.2.0beta.zip

  • Author
  • Localization

AlphaTwentyThree, posted Sat Apr 25, 2015 6:34 am (4805)


Anyone got the time to take a look at this?
  • Author
  • Localization

AlphaTwentyThree, posted Thu Apr 30, 2015 2:51 pm (4917)


Time for another update!
I didn't resolve the little problem above. I haven't encountered any other resS files that contained residual data and I've checked about 15 other games. So I'll leave it at that. Else, I've enhanced the script to support *.resource files that contain fsb5 archives. These are from newer Unity3D games. I've changed the code for the resS retrieval a bit to have everything in one place.
You can certainly update your script to 0.2.x :)

unity_0.2.1.zip

  • Author
  • Localization

AlphaTwentyThree, posted Thu Apr 30, 2015 2:58 pm (4918)


For all of you who are after the music, here's a batch that deletes everything but the music and videos. You'll have to use the second naming scheme for this to work ([basename~filename.extension])
Code:
md temp
move *.wav temp
move *.og* temp
move *.aif* temp
move *.snd temp
move *.mp3 temp
move *.fsb temp
del /Q *.1*, *.2*, *.3*, *.4*, *.5*, *.6*, *.7*, *.9*, *.0*, *.-*, *.script, *.bin, *.mat, *.xml, *.ttf, *.tex, *.shader, *.ter, *.tes, *.ani, *.89, *.82, *.png, *.sbam
cd temp
move *.* ..
cd..
rd temp
  • Author
  • Localization

aluigi, posted Thu Apr 30, 2015 3:02 pm (4919)


I see a '~' char while building FNAME, is it correct or a typo?
  • Author
  • Localization

AlphaTwentyThree, posted Thu Apr 30, 2015 3:23 pm (4921)


aluigi wrote:
I see a '~' char while building FNAME, is it correct or a typo?

No, I made that on pupose because of my naming scheme. It's basically the only pseudo-good-looking character that normally isn't used in file names. This way I can see where I made changes to the name. Same with a folder structure: I replace every "\" with a tilde so I can track the folder structure afterwards.
You can change it back to your naming scheme if you want to. ;)
  • Author
  • Localization

Stefanpl, posted Fri May 01, 2015 11:14 am (4948)


Can someone help me to modify script to extract .dds files which are type 28? Atm it extracts only .tex files which are same type 28 ;/
  • Author
  • Localization

AlphaTwentyThree, posted Fri May 01, 2015 7:43 pm (4966)


Stefanpl wrote:
Can someone help me to modify script to extract .dds files which are type 28? Atm it extracts only .tex files which are same type 28 ;/

I'm not sure I understand you correctly. Are you saying that type 28 holds tex as well as dds?
  • Author
  • Localization

Stefanpl, posted Tue May 19, 2015 1:52 pm (5299)


Neverdmind. I was using unity asset explorer earlier which converts .tex to .dds, so I tought that type 28 are .dds too. So now the question is, there is any way to convert .tex extracted by .bms script to some commone image extension?
  • Author
  • Localization

AlphaTwentyThree, posted Tue May 19, 2015 3:39 pm (5305)


Another update: the script now supports file retrieval from *.resource files from the newer games that hold fsb5 archives.
I've also changed the heuristics from "file size of *.snd" to "if *.resS or *.resource exists" as I got errors in one case.

unity_0.2.1b.zip

  • Author
  • Localization

aluigi, posted Tue May 19, 2015 3:43 pm (5306)


Cool to see you are in active development on this stuff :)
  • Author
  • Localization

AlphaTwentyThree, posted Tue May 19, 2015 3:52 pm (5307)


Well, ripping the newer releases absolutely demands that. ;)
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.