"Dump" command supports outputing a single object#30
Merged
SkowronskiAndrew merged 5 commits intomainfrom Aug 14, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new command-line option --objectid to the dump command, allowing users to dump only a specific object from an AssetBundle or SerializedFile instead of dumping all objects. This is particularly useful for large files where full dumps can be many megabytes in size.
Key changes include:
- Added
--objectidparameter to the dump command with support for negative object IDs - Modified the text dumper to filter objects based on the provided ID
- Updated documentation to reflect the new functionality
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| UnityDataTool/README.md | Added documentation for the new --objectid option |
| UnityDataTool/Program.cs | Added command-line option and parameter passing for object ID filtering |
| TextDumper/TextDumperTool.cs | Implemented object ID filtering logic in the dump method |
| TextDumper/README.md | Updated method documentation to include the new objectId parameter |
| Documentation/comparing-builds.md | Added brief mention of the new feature for focused object analysis |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
timt-unity3d
approved these changes
Jul 31, 2025
Collaborator
timt-unity3d
left a comment
There was a problem hiding this comment.
Looks good to me. This is super-useful. Thanks!
Collaborator
Author
|
Thanks for the review Tim! |
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.
When writing the topic about comparing builds i realized that it could be useful to dump just a single object, especially because the dumps for large files can be many megabytes in size.
This is a little update to add an optional --objectid filter. Copilot agent did a good job of the initial implementation but I adjusted the solution to something more to my taste and added more docs.
I also tested it, including support for negative objectids.
Example:
produces a txt file that only shows object -8066222900050932585:
Details:
I thought of suppressing the ExternalReference dump in this case, but its possible that the object has an external reference and that table is important to understand those references. So for the moment we always dump the External References (which can be empty as in the example above).
When run on a Scene AssetBundle that has multiple serialized files it will simply apply the filter to each dump.
For the moment i just added a quick mention in the comparing builds topic. But the idea of this feature is to use it in scripts that will more directly pinpoint a change in an assetbundle, e.g. first figure out which objects changed using the approaches already demonstrated, then actually dump out those objects using the new feature and trigger some sort of diff. I'm not certain the practical workflow for that given that some assetbundles might have a huge number of new/deleted/modified objects so as first step am just exposing the helpful low level functionality which can be useful even when run manually.