Skip to content

Conversation

sparr
Copy link
Contributor

@sparr sparr commented Jul 4, 2023

This PR resolves a few problems I had exporting assets from the game Autonauts.

  1. One assets file contains a reference to another with a relative path, which UnityPy was trying to load from the script's CWD instead of the original asset file path.
  2. That reference doesn't match the case of the actual directory or file name.
  3. There is another reference to library/unity default assets which, in addition to being relative and case insensitive, also doesn't exist because Library/ is apparently a magic path in Unity. Rather than calling that out explicitly here, I've opted to just silently ignore nonexistent paths/files.

I wasn't able to test on Windows, which might have a problem with the case insensitive search.

PS: I also spotted a bug in save() but can't test the fix I included here. Let me know if that's a problem and I can remove it.

@sparr
Copy link
Contributor Author

sparr commented Jul 17, 2023

Lots of unrelated pip install errors in the test failures. Unclear if that's all of them.

@K0lb3 K0lb3 merged commit 289ec62 into K0lb3:master Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants