Title: load_il2cpp() does not include ".dll" in assembly names when using AssetsTools backend · Issue #9 · UnityPy-Org/TypeTreeGeneratorAPI · GitHub
Open Graph Title: load_il2cpp() does not include ".dll" in assembly names when using AssetsTools backend · Issue #9 · UnityPy-Org/TypeTreeGeneratorAPI
X Title: load_il2cpp() does not include ".dll" in assembly names when using AssetsTools backend · Issue #9 · UnityPy-Org/TypeTreeGeneratorAPI
Description: When using the AssetsTools backend in TypeTreeGeneratorAPI, the behavior of load_il2cpp() is different from that of load_local_dll_folder(). load_local_dll_folder() will include a ".dll" at the end of each loaded assembly name, while loa...
Open Graph Description: When using the AssetsTools backend in TypeTreeGeneratorAPI, the behavior of load_il2cpp() is different from that of load_local_dll_folder(). load_local_dll_folder() will include a ".dll" at the end...
X Description: When using the AssetsTools backend in TypeTreeGeneratorAPI, the behavior of load_il2cpp() is different from that of load_local_dll_folder(). load_local_dll_folder() will include a ".dll" ...
Opengraph URL: https://github.com/UnityPy-Org/TypeTreeGeneratorAPI/issues/9
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"load_il2cpp() does not include \".dll\" in assembly names when using AssetsTools backend","articleBody":"When using the AssetsTools backend in TypeTreeGeneratorAPI, the behavior of `load_il2cpp()` is different from that of `load_local_dll_folder()`. `load_local_dll_folder()` will include a \".dll\" at the end of each loaded assembly name, while `load_il2cpp()` will not. Example script and output showcasing this:\n```Python\nfrom UnityPy.helpers.TypeTreeGenerator import TypeTreeGenerator\n\ngenerator_mono = TypeTreeGenerator('2020.3.32f1', generator=\"AssetsTools\")\n# Loading DummyDLLs dumped from LukeFZ's il2cppInsector\ngenerator_mono.load_local_dll_folder(\"./test/v0.11/inspectordll/\")\nmono_dlls = generator_mono.get_loaded_dll_names()\n\ngenerator_il2cpp = TypeTreeGenerator('2020.3.32f1', generator=\"AssetsTools\")\nbin = open(\"./test/v0.11/UnityFramework\", \"rb\").read()\nmetadata = open(\"./test/v0.11/global-metadata.dat\", \"rb\").read()\ngenerator_il2cpp.load_il2cpp(bin,metadata)\nil2cpp_dlls = generator_il2cpp.get_loaded_dll_names()\n\n# Sort lists to make names lineup\nmono_dlls.sort()\nil2cpp_dlls.sort()\n\nprint(f\"Mono DLLs: {mono_dlls[0]}, {mono_dlls[1]}, {mono_dlls[2]}\")\nprint(f\"IL2CPP DLLs: {il2cpp_dlls[0]}, {il2cpp_dlls[1]}, {il2cpp_dlls[2]}\")\n```\nOutput:\n```bash\nMono DLLs: ACTk.Runtime.dll, AddressablesPlayAssetDelivery.dll, AppsFlyer.dll\nIL2CPP DLLs: ACTk.Runtime, AddressablesPlayAssetDelivery, AppsFlyer\n```\n\nThis causes issues when UnityPy tries to get the type trees from TypeTreeGeneratorAPI as it will always pass in the assembly name with a \".dll\" at the end, and TypeTreeGeneratorAPI will simply return a \"Sequence contains no matching element\" exception when it can't find the assembly name with the extension. \n\n```bash\nError generating tree nodes:\nSequence contains no matching element\n```\n\nNote that in my testing this **only** happens with the AssetsTools backend. The other two backends seem to have consistent behavior between the loading methods, but since the type trees from those don't seem to be correct for the game I'm working with, I have to stick with AssetsTools.\nAssetStudio backend output:\n```bash\nMono DLLs: ACTk.Runtime.dll, AddressablesPlayAssetDelivery.dll, AppsFlyer.dll\nIL2CPP DLLs: ACTk.Runtime.dll, AddressablesPlayAssetDelivery.dll, AppsFlyer.dll\n```\nAssetRipper backend output:\n```bash\nMono DLLs: ACTk.Runtime, AddressablesPlayAssetDelivery, AppsFlyer\nIL2CPP DLLs: ACTk.Runtime, AddressablesPlayAssetDelivery, AppsFlyer\n```\n\nThe quickest solution I have found is to strip out the \".dll\" extension when before it gets passed to `monoTemplateGenerator.GetTemplateFieldPatch()` function in the AssetsTools backend file. I haven't extensively tested this yet, but for the game I'm working with this seems fine.\n```diff --git a/TypeTreeGeneratorAPI/TypeTreeGenerator/AssetsTools/AssetsToolsGenerator.cs b/TypeTreeGeneratorAPI/TypeTreeGenerator/AssetsTools/AssetsToolsGenerator.cs\n--- a/TypeTreeGeneratorAPI/TypeTreeGenerator/AssetsTools/AssetsToolsGenerator.cs\n+++ b/TypeTreeGeneratorAPI/TypeTreeGenerator/AssetsTools/AssetsToolsGenerator.cs\n@@ -68,6 +68,7 @@ namespace TypeTreeGeneratorAPI.TypeTreeGenerator.AssetsTools\n } else {\n #if ENABLE_IL2CPP\n monoTemplateGenerator = cpp2IlGenerator;\n+ assemblyName = assemblyName[..assemblyName.LastIndexOf('.')];\n #else\n monoTemplateGenerator = monoCecilGenerator;\n #endif\n```\n\nI haven't looked too deep into the C# code, so there might be better solutions like making the two loaders have consistent assembly naming. But if this solution seems fine, then it could be added for the next release. ","author":{"url":"https://github.com/Maren0000","@type":"Person","name":"Maren0000"},"datePublished":"2025-12-20T04:39:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/9/TypeTreeGeneratorAPI/issues/9"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:71fe12a8-f975-6328-b00c-b7d1858166c9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A1B2:2DC8D1:695E0C7:9417465:6A504C84 |
| html-safe-nonce | 06f1ccf3c0b9a65854b5199123a1cc5918123bb0b5aad4a2df5a73bbe71e25b2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUIyOjJEQzhEMTo2OTVFMEM3Ojk0MTc0NjU6NkE1MDRDODQiLCJ2aXNpdG9yX2lkIjoiMjI1OTQ4MTk4Mjk1MzA4MTk4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 144cc53ea74291df6f4dab55c4498248affc54c5ed306853e40124702e5a70d5 |
| hovercard-subject-tag | issue:3749537961 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/UnityPy-Org/TypeTreeGeneratorAPI/9/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5d38cfd1db9e34d5bc19015b3aa278ce891b0d917dcb798e7fef9d5c2365b59f/UnityPy-Org/TypeTreeGeneratorAPI/issues/9 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5d38cfd1db9e34d5bc19015b3aa278ce891b0d917dcb798e7fef9d5c2365b59f/UnityPy-Org/TypeTreeGeneratorAPI/issues/9 |
| og:image:alt | When using the AssetsTools backend in TypeTreeGeneratorAPI, the behavior of load_il2cpp() is different from that of load_local_dll_folder(). load_local_dll_folder() will include a ".dll" at the end... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Maren0000 |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| go-import | github.com/UnityPy-Org/TypeTreeGeneratorAPI git https://github.com/UnityPy-Org/TypeTreeGeneratorAPI.git |
| octolytics-dimension-user_id | 201099693 |
| octolytics-dimension-user_login | UnityPy-Org |
| octolytics-dimension-repository_id | 933901290 |
| octolytics-dimension-repository_nwo | UnityPy-Org/TypeTreeGeneratorAPI |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 933901290 |
| octolytics-dimension-repository_network_root_nwo | UnityPy-Org/TypeTreeGeneratorAPI |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5741a45fe07e5f377d0d4c524a92e3056acc51bb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width