Skip to content

Exception when analyzing Unity 6 asset bundles #22

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

Closed
lukechatton opened this issue Feb 28, 2025 · 2 comments
Closed

Exception when analyzing Unity 6 asset bundles #22

lukechatton opened this issue Feb 28, 2025 · 2 comments

Comments

@lukechatton
Copy link

After upgrading to Unity 6, I'm seeing this error when using the analyze command on an asset bundle.

Device Info:

  • Mac
  • Unity 6 (6000.0.37f1)

Command:

UnityDataTool analyze ./ -o ~/Desktop/bundles.db

Error:

System.Exception: Unsupported ManagedReferenceRegistry version 1001
   at UnityDataTools.Analyzer.PPtrAndCrcProcessor.ProcessManagedReferenceRegistry(TypeTreeNode node) in /Users/luke/easy-unity/UnityDataTools/Analyzer/PPtrAndCrcProcessor.cs:line 293
   at UnityDataTools.Analyzer.PPtrAndCrcProcessor.ProcessNode(TypeTreeNode node) in /Users/luke/easy-unity/UnityDataTools/Analyzer/PPtrAndCrcProcessor.cs:line 181
   at UnityDataTools.Analyzer.PPtrAndCrcProcessor.ProcessNode(TypeTreeNode node) in /Users/luke/easy-unity/UnityDataTools/Analyzer/PPtrAndCrcProcessor.cs:line 190
   at UnityDataTools.Analyzer.PPtrAndCrcProcessor.ProcessManagedReferenceData(TypeTreeNode refTypeNode, TypeTreeNode referencedTypeDataNode, Int64 rid) in /Users/luke/easy-unity/UnityDataTools/Analyzer/PPtrAndCrcProcessor.cs:line 333
   at UnityDataTools.Analyzer.PPtrAndCrcProcessor.ProcessArray(TypeTreeNode node, Boolean isManagedReferenceRegistry) in /Users/luke/easy-unity/UnityDataTools/Analyzer/PPtrAndCrcProcessor.cs:line 244
   at UnityDataTools.Analyzer.PPtrAndCrcProcessor.ProcessManagedReferenceRegistry(TypeTreeNode node) in /Users/luke/easy-unity/UnityDataTools/Analyzer/PPtrAndCrcProcessor.cs:line 288
   at UnityDataTools.Analyzer.PPtrAndCrcProcessor.ProcessNode(TypeTreeNode node) in /Users/luke/easy-unity/UnityDataTools/Analyzer/PPtrAndCrcProcessor.cs:line 181
   at UnityDataTools.Analyzer.PPtrAndCrcProcessor.Process(Int64 objectId, Int64 offset, TypeTreeNode node) in /Users/luke/easy-unity/UnityDataTools/Analyzer/PPtrAndCrcProcessor.cs:line 92
   at UnityDataTools.Analyzer.SQLite.SQLiteWriter.WriteSerializedFile(String relativePath, String fullPath, String containingFolder) in /Users/luke/easy-unity/UnityDataTools/Analyzer/SQLite/SQLiteWriter.cs:line 292
   at UnityDataTools.Analyzer.AnalyzerTool.Analyze(String path, String databaseName, String searchPattern, Boolean skipReferences) in /Users/luke/easy-unity/UnityDataTools/Analyzer/AnalyzerTool.cs:line 76
@Vorlias
Copy link

Vorlias commented Mar 1, 2025

So further investigating this - seems to be related to using [SerializeReference]. (which makes sense since this is the reference registry)

Having a non-null value, we instead get a different number:

System.Exception: Unsupported ManagedReferenceRegistry version 2029256710

Would it be likely that there's some change with Unity 6 here, with the binary format?

@SkowronskiAndrew
Copy link
Collaborator

SkowronskiAndrew commented Apr 21, 2025

Thanks @lukechatton and @Vorlias for logging this.

I hit the same "Unsupported ManagedReferenceRegistry version 1001" issue when looking at output of building the (megacity)[https://github.com/Unity-Technologies/megacity-metro] example.

I didn't test different versions of Unity to confirm your statement that it appeared to be a Unity 6 issue. From my understanding it seemed to be more about SerializeReference classes that themselves have SerializeReference fields on them (e.g. a nesting situation).

I'm pushed up a fix 0f33e5c, I think that will clear up the problem for you.

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

No branches or pull requests

3 participants