Skip to content

Conversation

@SkowronskiAndrew
Copy link
Collaborator

@SkowronskiAndrew SkowronskiAndrew commented Dec 30, 2025

New functionality for UnityDataTool analyze command

MonoScript support (see 736e718, fixes #37)

New view shows where all MonoScript objects are, e.g. in AssetBundles or a player build:

image

And view to see all MonoBehaviours and ScriptableObjects, with their C# type:

image

BuildReport support (including PackedAssets) See #45

Documentation for BuildReport support: https://github.com/Unity-Technologies/UnityDataTools/blob/v1_3/Documentation/buildreport.md

New serialized-file command (#47)

This is a fast way to get info out of a serialized file, in cases where creating an entire SQL database is overkill.
Initially supports objectlist and externalrefs.

Example:

UnityDataTool serialized-file objectlist level0
UnityDataTool serialized-file externalrefs sharedassets0.assets --format json

It supports for text and json output.

See Documentation/command-serialized-file.m for details

Centralize docs into Documentation folder

README.md remain in other folders but only for localized information or to point to the docs moved into /Documentation/

Improved automated tests

The new functionality is covered by automated tests, which are run as part of the github Actions.

The facilitate testing more example files have been added to the TestCommon\Data folder, e.g. example BuildReports and a simple Player build (with and without typetrees)

Note: a lot of the raw work on code, test and docs was performed by Claude and Cursor AI Agents, with a lot of iterative prompting, design work and guidance from me. I fixed things manually when needed. Because the tests are now in good shape the new code is well tested and probably more solid than if i had tried to write all of this myself. I also tested a lot with larger build results, including builds with 2 million objects.

SkowronskiAndrew and others added 6 commits December 28, 2025 19:07
Extracts MonoScript metadata (class name, namespace, assembly name)
into monoscripts table

This helps find what exact C# classes are referenced for MonoBehaviours and ScriptableObjects

script_object_view added to provide convenient view of all MonoBehaviours with their C# type
and
monoscript_view to show all the MonoScript objects (e.g. all C# types used in the build content)

The documentation is updated to show the more precise and simple lookups we can perform now to find MonoBehaviours for a particular class.
Move README.md content in various subfolders into the main Documentation folder
Documentation about the different analyze commands now has "command-" prefix
Adds comprehensive support for analyzing Unity BuildReport files, enabling detailed inspection of build contents and source asset tracking.
SkowronskiAndrew and others added 2 commits December 31, 2025 16:48
* 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
  * In a follow up could use it to improve the BuildReport importing (#55 )
These test dumps were not meant for source control
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 adds MonoScript and BuildReport support to UnityDataTool, introduces a new serialized-file command for quick file inspection, and consolidates documentation into a central Documentation folder.

Changes:

  • Added MonoScript object handling with new database tables/views to track C# script types
  • Added BuildReport and PackedAssets support for analyzing Unity build reports
  • Introduced serialized-file command for fast metadata extraction without full database creation
  • Centralized documentation from scattered README files into /Documentation/ folder
  • Added TypeIdRegistry for type name fallback when TypeTree unavailable
  • Enhanced test coverage with new test data and comprehensive test cases

Reviewed changes

Copilot reviewed 43 out of 61 changed files in this pull request and generated no comments.

Show a summary per file
File Description
UnityFileSystem/TypeIdRegistry.cs New registry mapping Unity TypeIds to type names for fallback when TypeTree unavailable
UnityDataTool/UnityDataTool.csproj Version bump to 1.3.0
UnityDataTool/SerializedFileCommands.cs New command handlers for quick SerializedFile inspection (objectlist, externalrefs)
UnityDataTool/Program.cs Added serialized-file command with subcommands and OutputFormat enum
UnityDataTool.Tests/UnityDataToolAssetBundleTests.cs New test verifying MonoScript database content
UnityDataTool.Tests/SerializedFileCommandTests.cs Comprehensive test suite for serialized-file command
UnityDataTool.Tests/SQLTestHelper.cs Added helper methods for asserting table/view existence
UnityDataTool.Tests/ExpectedDataGenerator.cs Updated to include monoscripts_count in expected data
UnityDataTool.Tests/BuildReportTests.cs Extensive new tests for BuildReport and PackedAssets support
UnityDataTool/README.md Redirected to centralized documentation
Documentation/unitydatatool.md New centralized command reference documentation
Documentation/command-serialized-file.md New documentation for serialized-file command
Documentation/buildreport.md New comprehensive BuildReport support documentation
Documentation/analyzer.md Relocated and enhanced Analyzer documentation
Documentation/textdumper.md Relocated TextDumper documentation
Documentation/referencefinder.md Relocated ReferenceFinder documentation
Documentation/*.md Updated cross-references to use new Documentation paths
TestCommon/Data/*/README.md New README files documenting test data
Analyzer/Util/GuidHelper.cs Helper for Unity GUID format conversion
Analyzer/SerializedObjects/PackedAssets.cs Reader for PackedAssets objects from BuildReports
Analyzer/SerializedObjects/MonoScript.cs Reader for MonoScript objects
Analyzer/SerializedObjects/BuildReport.cs Reader for BuildReport objects with file list processing
Analyzer/SQLite/Writers/SerializedFileSQLiteWriter.cs Registered new handlers for MonoScript, BuildReport, PackedAssets
Analyzer/SQLite/Parsers/SerializedFileParser.cs Added .md to ignored extensions
Analyzer/SQLite/Handlers/*.cs New handlers for MonoScript, BuildReport, PackedAssets
Analyzer/Resources/*.sql New SQL schema definitions for MonoScript, BuildReport, PackedAssets
Analyzer/README.md Redirected to centralized documentation
README.md Updated links to Documentation folder
AGENTS.md Updated with code style guidelines and new command examples
Files not reviewed (1)
  • Analyzer/Properties/Resources.Designer.cs: Language not supported

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

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.

Add MonoScript table

2 participants