Skip to content

Comments

WIP - Expose API to retrive all type definitions & AssetStudio backend hacks#8

Draft
mos9527 wants to merge 6 commits intoUnityPy-Org:mainfrom
mos9527:complete-types
Draft

WIP - Expose API to retrive all type definitions & AssetStudio backend hacks#8
mos9527 wants to merge 6 commits intoUnityPy-Org:mainfrom
mos9527:complete-types

Conversation

@mos9527
Copy link
Contributor

@mos9527 mos9527 commented Sep 28, 2025

Breaking - TypeTreeGenerator_getClassDefinitions replaces TypeTreeGenerator_getMonoBehaviorDefinitions.

This PR allows all class typedefs besides MonoBehaviour based ones to be also consumed from the API, including ScriptableObject and co as disscussed in #1 (comment).

Furthermore, some (unfortunate) hacks have been applied to the AssetStudio backend to make its output conformant to the old one i.e. https://github.com/K0lb3/TypeTreeGenerator. 29cc677 should contain more details.

As the title suggests the PR is heavily a work-in-progress. Please do let me know if there's any change required - I'll leave this as a draft for now. Again, thanks a lot for your work in this repo!

…ptableObject based types

AssetStudio - Add recusion checks to kill recursive types
AssetStudio - Use UnityCsReference sources directly w/o submodule
AssetStudio - Releax UnityCsReference checks to include errornously omitted fields
CLI - Add `--output` , `-o` option to produce JSON like the orignial TypetreeGenerator
@mos9527 mos9527 marked this pull request as draft September 28, 2025 01:54
@K0lb3
Copy link
Collaborator

K0lb3 commented Oct 3, 2025

I was thinking about simply making an option to add the MonoBehaviour nodes on demand.
To enable backward compatibility this option would be enabled by default.

@K0lb3
Copy link
Collaborator

K0lb3 commented Oct 3, 2025

I'm not really a fan of converting the GetMonoBehaviourDefinitions to GetClassDefinitions.
I think that we could simply keep both around. GetClassDefinitions could get a filter input, which GetMonoBehaviourDefinitions then uses.

@K0lb3
Copy link
Collaborator

K0lb3 commented Oct 3, 2025

Is there some way to hack around the direct inclusion of the cs reference code?
Some patching mechanic we could use to not enter the license minefield deeper....

@K0lb3
Copy link
Collaborator

K0lb3 commented Oct 3, 2025

Anyway, thanks a lot for the PR and work, I will look through it for good in the coming week.

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