Search Unity

Bug Preview 17: Can't build addressable assets with uidocument in scene

Discussion in 'UI Toolkit' started by Domigotchi, Sep 6, 2021.

  1. Domigotchi

    Domigotchi

    Joined:
    Dec 27, 2019
    Posts:
    1
    upload_2021-9-6_21-7-52.png
    I just installed and tried UI toolkit version 1.0.0-preview.17 to create a runtime UI with the current project I am working on. I created a simple UI in UIBuilder and put it into my scene. upload_2021-9-6_21-17-27.png
    Unfortunately, I wasn't able to make a build, as the creation of the addressable assets fails for the scene containing the UI Document Component.
    I am using the latest Addressable version 1.19.4.
    Here are the error messages in text form:
    Code (CSharp):
    1. An asset is marked with HideFlags.DontSave but is included in the build:
    2. Asset: 'Library/unity default resources'
    3. Included from scene: 'Assets/Chapters/Chapter1/Chapter1_Outro.unity'
    4. Asset name: ThemeStyleSheet
    5. (You are probably referencing internal Unity data in your build.)
    6. UnityEditor.GenericMenu:CatchMenu (object,string[],int)
    7.  
    Code (CSharp):
    1. An asset is marked with HideFlags.DontSave but is included in the build:
    2. Asset: 'Library/unity default resources'
    3. Included from scene: 'Assets/Chapters/Chapter1/Chapter1_Outro.unity'
    4. Asset name: VisualTreeAsset
    5. (You are probably referencing internal Unity data in your build.)
    6. UnityEditor.GenericMenu:CatchMenu (object,string[],int)
    7.  
    Code (CSharp):
    1. An asset is marked with HideFlags.DontSave but is included in the build:
    2. Asset: 'Library/unity default resources'
    3. Included from scene: 'Assets/Chapters/Chapter1/Chapter1_Outro.unity'
    4. Asset name: StyleSheet
    5. (You are probably referencing internal Unity data in your build.)
    6. UnityEditor.GenericMenu:CatchMenu (object,string[],int)
    7.  
     

    Attached Files:

    jjhartmann likes this.
  2. AlexandreT-unity

    AlexandreT-unity

    Unity Technologies

    Joined:
    Feb 1, 2018
    Posts:
    377
    Hi Domigotchi, could you report a repro project with this issue with the bug reporter so we can investigate? Go to Help > Report a bug...
    Please post the case number in the thread. Thanks!
     
  3. jjhartmann

    jjhartmann

    Joined:
    Mar 24, 2017
    Posts:
    10
    I'm having this exact same issue when trying to build addressable asset bundles with the UI Toolkit. My errors are exactly the same as what is reported here too.

    Code (CSharp):
    1.  
    2. An asset is marked with HideFlags.DontSave but is included in the build:
    3. Asset: 'Library/unity default resources'
    4. Included from scene: 'Assets/_mtion/_Scenes/UtilityScenes/UnityAnalyticsScene.unity'
    5. Asset name: ThemeStyleSheet
    6. (You are probably referencing internal Unity data in your build.)
    7. UnityEditor.GenericMenu:CatchMenu (object,string[],int)
    8.  
    Code (CSharp):
    1.  
    2. An asset is marked with HideFlags.DontSave but is included in the build:
    3. Asset: 'Library/unity default resources'
    4. Included from scene: 'Assets/_mtion/_Scenes/UtilityScenes/UnityAnalyticsScene.unity'
    5. Asset name: StyleSheet
    6. (You are probably referencing internal Unity data in your build.)
    7. UnityEditor.GenericMenu:CatchMenu (object,string[],int)
    8.  
    Code (CSharp):
    1.  
    2. An asset is marked with HideFlags.DontSave but is included in the build:
    3. Asset: 'Library/unity default resources'
    4. Included from scene: 'Assets/_mtion/_Scenes/UtilityScenes/UnityAnalyticsScene.unity'
    5. Asset name: VisualTreeAsset
    6. (You are probably referencing internal Unity data in your build.)
    7. UnityEditor.GenericMenu:CatchMenu (object,string[],int)
    8.  
    FYI: The referenced scene in the above error is empty. No GameObjects or UI Toolkit asset are referenced in it.




    Any updates on this?
     
  4. jjhartmann

    jjhartmann

    Joined:
    Mar 24, 2017
    Posts:
    10
    Update: I was able to resolve this issue by deleting `Assets/AddressableAssetsData` folder and then reimplementing the group bundle structure in the `Addressable Groups` window. Not sure why that worked. Maybe an older AA schema isn't able to handle imported UI Toolkit assets?