Skip to content

Getting build target information from an asset bundle #6

Description

@tallior

I'd like to know if it's possible to use UnityDataTools for loading a built asset bundle and figuring out what is the BuildTarget it was built for.

I've looked at the example projects that are included in this repo but could not find any examples of such usage.

Activity

  1. xdegtyarev commented on Feb 18, 2025

    @xdegtyarev
    Collaborator

    I don't think BuildTarget is serialized in the archives. I can't find anything in src, that would tell me that we do.

  2. SkowronskiAndrew commented on Apr 21, 2025

    @SkowronskiAndrew
    Collaborator

    Target Platform is saved in the header of the SerializedFiles inside an AssetBundle. But so far as I know this is not currently exposed by UnityDataTool or binary2text.

  3. SkowronskiAndrew commented on Dec 31, 2025

    @SkowronskiAndrew
    Collaborator

    I'm introducing a "serialized-file" command in #47 That could be a good place to also expose the target platform.
    However we have to do more work to:

    • Either update Unity to expose it in the UnityFileSystem API (e.g. UnityFileSystem\DllWrapper.cs)
    • Add code to parse the header of the serialized file directly in UnityDataTools (not so easy, because the file format is complicated and has a lot of backward compatibility considerations)
  4. SkowronskiAndrew commented on Apr 1, 2026

    @SkowronskiAndrew
    Collaborator

    I forgot to close this ticket. This is now supported using the "serialized-file metadata"

    https://github.com/Unity-Technologies/UnityDataTools/blob/main/Documentation/command-serialized-file.md#metadata

    To get the target of an AssetBundle it would be necessary to extract the files and then look at the metadata of the serialized file inside the AssetBundle. Sorry its not a single step process, but it does reflect how its actually stored and we will continue to add more info and easier usability bit by bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions