Skip to content

Conversation

@SkowronskiAndrew
Copy link
Collaborator

@SkowronskiAndrew SkowronskiAndrew commented Dec 31, 2025

  • New command for quick access to information from the header of a serialized file (external references and object list)
    • In future we can expose typetree information
  • Add a more complete (but tiny) Player build into the test data (with and without typetrees)
  • Introduce list of common types

Simple player build including build report
Importers shouldn't make it into the build so remove them from the list.
Also add a todo as the place that can use the TypeIdRegistry
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new serialized-file command for quick inspection of SerializedFile metadata, complementing the existing analyze command with a lightweight alternative for examining object lists and external references without database generation.

Key Changes:

  • New serialized-file command with objectlist and externalrefs subcommands supporting both text and JSON output formats
  • TypeIdRegistry utility class mapping Unity TypeIds to human-readable type names for files without TypeTree data
  • Comprehensive test suite validating command functionality against new Player build test data (with and without TypeTrees)

Reviewed changes

Copilot reviewed 10 out of 23 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
UnityFileSystem/TypeIdRegistry.cs Registry mapping common Unity TypeIds to type names as fallback when TypeTree unavailable
UnityDataTool/SerializedFileCommands.cs Command handlers for listing external references and objects in SerializedFiles
UnityDataTool/Program.cs CLI integration for new serialized-file command with text/JSON format options
UnityDataTool.Tests/SerializedFileCommandTests.cs Test suite covering command output formats, cross-validation, and error handling
TestCommon/Data/PlayerWithTypeTrees/README.md Documentation for new test data containing complete Player build with TypeTrees
TestCommon/Data/PlayerNoTypeTree/README.md Documentation for test data variant without TypeTree information
Documentation/unitydatatool.md Updated main docs with serialized-file command examples
Documentation/command-serialized-file.md Complete command reference with use cases and examples
Analyzer/SQLite/Handlers/PackedAssetsHandler.cs TODO comment for future TypeIdRegistry integration in BuildReport importing
AGENTS.md Updated architecture documentation reflecting new command and TypeIdRegistry

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Regenerate type id registry from the raw ClassIDReference.md file - the original list had some errors
// TODO: Ideally we would also populate the type table if the content.Type is
// not already in that table, and if we have a string value for it in TypeIdRegistry. That would
// make it possible to view object types as strings, for the most common types, when importing a BuildReport
// without the associated built content.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#55 tracks this "todo"

@SkowronskiAndrew SkowronskiAndrew merged commit 66a95a4 into v1_3 Dec 31, 2025
7 checks passed
@SkowronskiAndrew SkowronskiAndrew deleted the sf_command branch December 31, 2025 21:48
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