nesrak1 / UABEA

c# uabe for newer versions of unity
MIT License
1.1k stars 143 forks source link

Error while extracting MonoBehaviour script #227

Closed AtsushiShiga closed 1 year ago

AtsushiShiga commented 1 year ago

I'm trying to add certain glyphs into MonoBehaviour script (there should be a large table inside), which goes with corresponding font atlas. But instead of it UABEA opens an error-window with the following lines: "MonoBehaviour template info failed to load. MonoBehaviour assets will not be fully deserialized.", and saves .txt with just 5 lines inside. The script itself is in the root directory of the game inside "sharedassets0". I've tried to use v.4, v.5 and the last build of UABEA.

nesrak1 commented 1 year ago

The error message is just saying that it couldn't find the dlls or native libraries/metadata. If you moved the file from it's original location or just extracted one file from an apk, this will happen.

If you resize the error dialog window, there will be another message about the search directory. In that directory, UABEA looks for a folder called Managed and looks for dlls or global-metadata.dat. If you're in a custom bundle folder (anything other than StreamingAssets), you'll need to copy the bundle out and put it in the _Data folder (for now).

AtsushiShiga commented 1 year ago

Thank you! It works, but with a minor correction: I placed "managed" folder there and the error window stopped popping up, but deserialization went wrong anyway (same 5 lines with object ID and name string). So I decided to place "managed" folder from PC version of the game instead of original switch folder. And it deserializes script as it should be. May be a useful trick for those who edit assets on Switch-versions.