-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArgumentNullException in AT3 preview 3 #106
Comments
This exception is in LibCpp2IL so the issue probably lies there and not something in AssetsTools.NET. I'm planning on upgrading the Cpp2IL version soon so that it (hopefully) fixes problems like these, but the nightly Cpp2IL versions aren't on nuget so I can't just click update and call it a day. |
Thanks for the answer, I'm gonna try and see if I get some workaround in the meantime. |
For now, you can use cpp2il or il2cppdumper through command line to produce dummy dlls. Then you can use the MonoCecil package on that directory. |
I followed your suggestion but in a slightly different way. I'm using the cpp2il c# api to generate the dummy dlls during runtime of my application, and then I load them with the MonoCecilTempGenerator. But then I get an EndOfStreamException when trying to get the basefield:
What is weird though, is that UABEA works fine with the DLLs that were generated by my cpp2il call. And as I saw in UABEA's source code, it's also using the MonoCecil package to do so. What am I missing? Is there any trick? |
There shouldn't be any trick. It should work the same since UABEA is basically using preview 3 AT.NET as well. (That's assuming you toggled CPP2IL off in the main window.) You could try adding a print statement to ReadType to see what fields it's trying to read and compare that with UABEA. You might find somehow that UABEA read more/less fields than what you see in AT.NET. |
Thanks for the tips! I was able to find out that my code was missing to tell cpp2il to restore custom attributes, which caused several fields not being read into the templates. Now this workflow with cpp2il generation works fine! |
Thank you! Works for me. |
Hi, I'm using the preview 3 of the AT3, so far bundle reading/writing is neat!
But now I'm working on reading/writing assets files in an il2cpp game, and I'm getting an ArgumentNullException when getting the baseField for a MonoBehavior.
I followed the pages from the wiki correctly, loaded the tpk file (got it from the latest build in the link mentioned in the wiki), then used the Cpp2Il package and loaded it into the AssetsManager.
Here's the relevant part of the stack trace:
I tried to debug it but no success so far.
The text was updated successfully, but these errors were encountered: