Repository navigation
Document circular reference handling in content directory builds (6.6 vs 6.7) - #154
Merged
Merged
Conversation
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
Unity 6.7 changes how content directory builds handle circular references between assets. Unity 6.6 merges each cycle into a single Content File at build time. Unity 6.7 keeps every asset in its own Content File and loads the files of a cycle together at runtime. Users will analyze builds from both versions with UnityDataTool, so the Content Directory Format page now describes what each version produces.
Changes
contentdirectory-format.md:LoadableandLoadableSceneIdreferences don't count, and scenes can never be part of a cycle.SourceAssetsentry inContentLayout.jsonlists every asset in the loop.SerializedFileDependencies. The files load as one unit at runtime, and the build fails if a cycle's combined size is over the limit.circularrefs.jsonreport that 6.7 writes to the build history directory, with an example. The example is anonymized from a real build.contentdirectory-format.mdnow says that itsContentLayout.jsonexcerpts use the v3 schema (Unity 6.7), and links to the v2 differences.contentlayout.md, Binary artifacts:ArtifactReferencesnever records dependencies between serialized files. Acontentfileartifact references only.resS/.resourcefiles, and those are leaf nodes. That is why the graph never contains cycles, and the design will keep it that way.SerializedFileDependencies, which can contain cycles in 6.7, and collect each file's artifact references.Testing
Documentation only. I checked the doc excerpts against the v3 reference layout in
TestCommon. I checked the behavior described against the 6000.6 and 6000.7 build code. I also checked thecircularrefs.jsonschema, and the claim that eachfileIdmatches aStableIdinContentLayout.json, against a real 6.7 build.