[#107] Add Unity 6.6 BuildReport Summary fields and ContentSummary tables#108
Merged
Conversation
…bles Part 1: extend build_reports with the new 6.6 BuildSummary fields (build_name, build_content_options, build_session_guid, build_manifest_hash, build_profile_path, build_profile_guid, data_path), left NULL for older reports. Part 2: add on-demand build_report_content_* tables and views for the new ContentSummary object (cross-build stats, per-type stats, per-source-asset stats).
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates UnityDataTools’ build report analysis pipeline (Analyzer → SQLite schema/handlers + CLI tests/docs) to support Unity 6.6’s expanded BuildSummary fields and the new ContentSummary object, while remaining compatible with older Unity build reports.
Changes:
- Added seven new nullable columns to
build_reportsand populated them when present in Unity 6.6+ BuildReports (including proper NULLing of all-zero GUID/Hash128 values). - Introduced an on-demand
ContentSummaryHandlerplus newbuild_report_content_*tables and views, following the existing lazy-schema pattern used byPackedAssets. - Added test coverage for Unity 6.6 reports and documented the new schema in
Documentation/buildreport.md.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| UnityDataTool.Tests/BuildReportTests.cs | Adds Unity 6.6-focused tests for new BuildSummary columns and ContentSummary tables/views, plus backwards-compat tests for older reports. |
| UnityBinaryFormat/GuidHelper.cs | Adds FormatUnityHash128 helper to format manifest hashes consistently with Unity’s Hash128.ToString(). |
| Documentation/buildreport.md | Documents ContentSummary support, new tables/views, and the new Unity 6.6 build_reports columns + lazy-creation behavior. |
| Analyzer/SQLite/Writers/SerializedFileSQLiteWriter.cs | Registers ContentSummaryHandler so ContentSummary objects are captured during analysis. |
| Analyzer/SQLite/Handlers/ContentSummaryHandler.cs | New handler: lazy-creates schema, inserts ContentSummary totals, type stats, and asset stats; seeds types from TypeIdRegistry for readable views. |
| Analyzer/SQLite/Handlers/BuildReportHandler.cs | Extends build_reports INSERT to include the seven new nullable Unity 6.6 fields. |
| Analyzer/SerializedObjects/ContentSummary.cs | New serialized-object reader for Unity 6.6 ContentSummary (totals, type stats list, asset stats list). |
| Analyzer/SerializedObjects/BuildReport.cs | Reads Unity 6.6 optional Summary fields safely (via HasChild) and normalizes default GUID/Hash128 values to null. |
| Analyzer/Resources/ContentSummary.sql | New on-demand tables and views for ContentSummary and per-type stats, resolving build_report_id via same-serialized-file join (PackedAssets pattern). |
| Analyzer/Resources/BuildReport.sql | Adds the seven new Unity 6.6 columns to the build_reports table schema. |
| Analyzer/Properties/Resources.resx | Embeds ContentSummary.sql as a resource. |
| Analyzer/Properties/Resources.Designer.cs | Exposes the embedded ContentSummary SQL resource to code. |
Files not reviewed (1)
- Analyzer/Properties/Resources.Designer.cs: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Manual fixes based on review. Co-authored-by: Andrew Skowronski <86242170+SkowronskiAndrew@users.noreply.github.com>
Reorganize the page so its focus is what UnityDataTool extracts and how build reports differ across build types and Unity versions (which the versioned Unity Manual intentionally does not cover): - Add a build-type x data-availability matrix and a "Unity version differences" section (ContentSummary added in 6.6, PackedAssets scene coverage, content directory builds omit PackedAssets, build history location change). - Note ContentSummary is absent for scripts-only/content-reusing Player builds and reflects only rebuilt bundles for incremental AssetBundle builds. - Document the --build-history option for content directory analysis. - Consolidate usage, examples, schema, alternatives, and limitations.
- Add the built-in Build Analysis window (6.6+) as an alternative UI. - Note the BuildReportInspector package's 6.6 status and its overlap with the built-in window. - Restructure the BuildReport API guidance around build history: BuildHistory. LoadBuildReport for 6.6+ tracked builds, with the GetLatestReport/AssetDatabase/ InternalEditorUtility approaches kept for pre-6.6 and AssetBundle reports.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #107.
Unity 6.6 enriches the
BuildReportwith additionalBuildSummaryfields and a newContentSummaryobject. This PR teachesanalyzeto capture both. All new data degrades gracefully: analyzing a report from an older Unity version produces no error — the newbuild_reportscolumns are left NULL and theContentSummarytables are simply not created (mirroring the existing on-demand behavior of the PackedAssets tables).Changes
Part 1 — new
build_reportscolumnsAdded seven columns for the Unity 6.6
BuildSummaryfields:build_name,build_content_options,build_session_guid,build_manifest_hash,build_profile_path,build_profile_guid,data_path. Each is read only when present in the TypeTree, so older reports leave them NULL. All-zero GUIDs and Hash128 values (e.g. no active build profile, non-ContentDirectory builds) are stored as NULL rather than a string of zeros. AGuidHelper.FormatUnityHash128helper formats the manifest hash to match Unity'sHash128.ToString().The intentionally-ignored fields (
platformGroupName,crc,multiProcessEnabled) remain ignored.Part 2 — ContentSummary tables and views
Added an on-demand
ContentSummaryHandler(class id 330615474) following the PackedAssets pattern, plus three tables and two views:build_report_content_summary— cross-build totals (sizes and counts)build_report_content_type_stats— per Unity object type: size, object/resource countsbuild_report_content_asset_stats— per source asset: GUID, path, size, object/resource countsbuild_report_content_summary_view/build_report_content_type_stats_view— resolvebuild_report_id(and, for type stats, the type name)A
ContentSummaryobject does not record which build it belongs to, so — exactly as with PackedAssets — the tables store the ContentSummary object's own id and the views resolvebuild_report_idvia the BuildReport object (type 1125) in the same serialized file. Type names are populated fromTypeIdRegistryso the type-stats view is useful even when the build output is not analyzed alongside the report.Documentation/buildreport.mddocuments all of the above.Testing
dotnet test— full suite green (265 UnityDataTool.Tests + 62 Analyzer.Tests + 425 UnityFileSystem.Tests, 0 failures).Added 6 tests to
BuildReportTests.cscovering: the new Summary columns on a ContentDirectory report, the emptybuild_namecase for an AssetBundle report, NULL columns for an older report, ContentSummary table population and spot-checked values, on-demand absence of the tables for an older report, and correctbuild_report_idresolution when multiple 6.6 reports are analyzed together. These use the existing Unity 6.6 reference reports underTestCommon/Data/LeadingEdgeBuilds.Also manually verified against the reference reports via
analyze+ SQL queries, and against olderTestCommon/Data/BuildReportsreports to confirm backward compatibility.