Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Bug Subscenes + UI entity header failed to load

Discussion in 'UI Toolkit' started by thelebaron, Nov 17, 2020.

  1. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    https://issuetracker.unity3d.com/is...hen-ui-toolkit-package-is-included-in-project

    Just a note, this is still occurring with p12 of the ui package and the latest entities package on 2020.2.0b11

    "Loading Entity Scene failed because the entity header file couldn't be resolved. This might be caused by a failed import of the entity scene. Please take a look at the SubScene MonoBehaviour that references this scene or at the asset import worker log in F:\Repositories\uitk\Logs. scenePath=Assets/Scenes/SampleScene/New Sub Scene.unity "

    Fails in a new empty project with just packages and a subscene consisting of a cube.
     
  2. etienne_unity

    etienne_unity

    Unity Technologies

    Joined:
    Aug 31, 2017
    Posts:
    102
    Just to clarify - if you remove the UI package, this error disappears?
     
  3. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    yes(after a reimport all + restart editor)
     
  4. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    780
    @thelebaron sorry it took so long, but I'm back to investigate on this issue. Unfortunately I haven't been able to reproduce it, specifically the subscene build issue. Internally I found another bug in the asset data base that may be related and has been fixed in 2020.2.0b15.

    Would you mind confirming wether or not you're still reproducing this with latest versions of both com.unity.ui and 2020.2 ?

    Thanks
     
  5. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    @antoine-unity Hi, forum notifications didnt actually alert me to this but I appreciate the followup.

    I recently got an email regarding from qa
    "We successfully reproduced this issue. It seems that the issue was caused by two bugs at once, right now the issue is that the "Build(Latest git)" Script is not working properly with UI Toolkit installed. It will be possible to follow the progress on a chosen resolution in our public Issue Tracker once the report has been processed (this might take up to an hour):
    https://issuetracker.unity3d.com/product/unity/issues/guid/1300294"

    I'm a bit unclear what the issue with my build script would be but in any case I just tested a new blank project,
    using 2020.2.0f1, p13 of uitoolkit & latest hybridrenderer and no other scripts packages added (besides what gets auto added from pacman).
    Creating a cube and then converting it to a subscene(and closing the subscene) results in the entity header bug, didn't even have to build the project.
     
    adammpolak and RogueException like this.
  6. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    @thelebaron when I get the "entity header" issue with sub scenes what works for me is deleting the "SceneDependencyCache" folder.
     
  7. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    unfortunately that doesnt resolve the reproduction steps I described in my previous post
     
    adammpolak likes this.
  8. MarcelArioli

    MarcelArioli

    Joined:
    May 31, 2014
    Posts:
    28
    yeah for me neither. Bug still appears
     
  9. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    Any updates to this?
     
  10. Kmsxkuse

    Kmsxkuse

    Joined:
    Feb 15, 2019
    Posts:
    306
  11. Lukas_Kastern

    Lukas_Kastern

    Joined:
    Aug 31, 2018
    Posts:
    97
    Wobbers likes this.
  12. l33t_P4j33t

    l33t_P4j33t

    Joined:
    Jul 29, 2019
    Posts:
    232
    same, 2020.2.2, entities 17, toolkit 13
     
  13. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    995
    Same here with bugreport : 1312659
    Could not actually remove the ui package from the project has it's used a lot but did not have the same issue with other project in similar configuration without the UI pacakge.
     
  14. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    @WAYN_Games did you get an issue tracker for that report? bumping this thread because upon checking the most recent tracker for what I reported, its been reported as a duplicate of an issue that doesnt really appear to have any similarities?
     
  15. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    995
    No update unfortunately. I sent back more info with some logs through the issue tracker (fogbugz) but did not get any answer yet.
     
    thelebaron likes this.
  16. l33t_P4j33t

    l33t_P4j33t

    Joined:
    Jul 29, 2019
    Posts:
    232
    utoolkit has been depreciated. UIDocument is a core part of the engine now in the alpha 2021.2, so you don't need the uibuilder + uitoolkit packages anymore to use uielements (and so you can use subscenes now)
     
    Last edited: Feb 27, 2021
    Wobbers and thelebaron like this.
  17. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    995
    Subscene does work in lastest alpha. I'll have to finish the upgrade because it broke some stuff but it's promissing.
     
  18. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    This is happening with 2020.3.0f1 and UI Toolkit 14
     
  19. sturdypower1

    sturdypower1

    Joined:
    Oct 6, 2019
    Posts:
    2
    Seem to be having the same issues with 2020.3.2f1 and UI Toolkit 14
     
  20. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    1,006
  21. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
  22. AdamBebko

    AdamBebko

    Joined:
    Apr 8, 2016
    Posts:
    168
    I'm still getting this error on 2020.3.3f1

    UIToolkit 1.0.0-preview.14
    Entities 0.17.0-preview.41

    Loading Entity Scene failed because the entity header file couldn't be resolved. This might be caused by a failed import of the entity scene. Please take a look at the SubScene MonoBehaviour that references this scene or at the asset import worker log in /redacted/Logs. scenePath=Assets/Scenes/Test/testIntest.unity guid=4afeb893102c4442a86acc0ce373ab85
    UnityEngine.Debug:LogError (object)
    Unity.Debug:LogError (object) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/Stubs/Unity/Debug.cs:13)
    Unity.Scenes.ResolveSceneSectionUtility:ResolveSceneSections (Unity.Entities.EntityManager,Unity.Entities.Entity,Unity.Entities.Hash128,Unity.Entities.RequestSceneLoaded,Unity.Entities.Hash128) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Scenes/ResolveSceneSectionUtility.cs:81)
    Unity.Scenes.ResolveSceneReferenceSystem:OnUpdate () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Scenes/ResolveSceneReferenceSystem.cs:174)
    Unity.Entities.SystemBase:Update () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/SystemBase.cs:400)
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:472)
    Unity.Entities.ComponentSystemGroup:OnUpdate () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:417)
    Unity.Entities.ComponentSystem:Update () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:472)
    Unity.Entities.ComponentSystemGroup:OnUpdate () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:417)
    Unity.Entities.ComponentSystem:Update () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    Unity.Entities.ScriptBehaviourUpdateOrder/DummyDelegateWrapper:TriggerUpdate () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ScriptBehaviourUpdateOrder.cs:333)
     
  23. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    Ah shoot @mcoted3d that is the exact issue, how do we get this resolved?

    (this seems to be a show stopper to use UI toolkit with LTS)
     
  24. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    1,006
    We'll have to have another look, I couldn't reproduce with the 2020.3.3 candidate, so I'm not sure what's going on.

    The good news is that this should not occur with 2021.2+ (UI Toolkit + Runtime support is included in the editor, no need for a package).
     
  25. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    1,006
  26. AdamBebko

    AdamBebko

    Joined:
    Apr 8, 2016
    Posts:
    168
    @mcoted3d great news! I'll try it out when it goes live
     
    adammpolak likes this.
  27. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    Nice, thank you @mcoted3d ! Will check it out when 2020.3.4f1 is live :)
     
  28. AdamBebko

    AdamBebko

    Joined:
    Apr 8, 2016
    Posts:
    168
    @mcoted3d Unfortunately, it still occurs with a new sub scene in an existing project in 2020.3.4f1.

    Error also occurs in this project using a brand new scene, adding a new sub scene and unloading.

    Entities 0.17.0-preview.41
    toolkit 1.0.0-preview.14

    But....
    When I create an empty project add those two packages it works though. I can unload a new sub scene with no errors.

    I tried deleting the library/logs/org folders, didn't help. Not sure what else to try.

    Update: I tried installing the same packages to the empty project one by one, and it was when I installed com.unity.rendering.hybrid that the error came back! it installed 0.11.0-preview.42. Interestingly, after removing the package, the error persists! Even after deleting library/logs/obj of this empty project too.

    Perhaps this package is causing the issue?
     
    Last edited: Apr 16, 2021
    adammpolak likes this.
  29. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    @mcoted3d currently this bug makes it so you cannot use DOTS + 2020 LTS + UI Toolkit

    This is a critical bug, Unity LTS is unusable trying to combine DOTS and UI Toolkit
     
    AdamBebko likes this.
  30. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    1,006
    Since we couldn't reproduce the original bug (case 1300294) after the assembly override fix landed, it was closed as a duplicate. I think a fresh bug with fresh repro steps would help. I would encourage you to file a new bug report (Help > Report a Bug...). Also send the bug IDs here please.

    It's hard to tell at this point if the UI Toolkit package is the cause of the failures or not, so having new projects could help steer us in the right direction.
     
  31. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    Will do.

    I will make a more clear "repro" but it is:

    - Download 2020.3 LTS
    - Manually add the UI Builder/Toolkit to the package manifest
    - Create a SubScene
    - Watch the entity header issue appear
     
  32. AdamBebko

    AdamBebko

    Joined:
    Apr 8, 2016
    Posts:
    168
    I posted a bug report from an “empty” project.
    Case 133163

    thanks for continuing to look into this.
     
  33. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    @mcoted3d are we set with the bug report to look into this issue? Would really like to be able to continue using DOTS + UI Toolkit
     
  34. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    1,006
    Are you saying you are getting the issue without building a player?
     
  35. AdamBebko

    AdamBebko

    Joined:
    Apr 8, 2016
    Posts:
    168
    Yes, it happens in the editor, reproducibly, every time.
     
    adammpolak likes this.
  36. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    Yes

    1 New 2020 LTS Project + DOTS + UI Toolkit (add to manifest manually)
    2 Create SubScene
    3 Get EntityHeader file issue
     
  37. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    @mcoted3d here is a 5 minute video showing the bug

    It really is just:
    1. opening 2020 LTS
    2. adding:
    "com.unity.rendering.hybrid": "0.11.0-preview.42",
    "com.unity.ui": "1.0.0-preview.14",
    "com.unity.ui.builder": "1.0.0-preview.13",
    3. Creating SubScene
    4. Entity Issue

    https://share.getcloudapp.com/nOuob5Ak
    (cc @AdamBebko )
    upload_2021-4-26_11-59-41.png
     
    WAYNGames, thelebaron and AdamBebko like this.
  38. AdamBebko

    AdamBebko

    Joined:
    Apr 8, 2016
    Posts:
    168
    Yes, mine looks exactly the same, except on Mac, and installing via package manager.
     
    adammpolak likes this.
  39. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    1,006
    Thanks for sharing, this should be easier to debug.
     
    AdamBebko and adammpolak like this.
  40. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    Any luck on this? Been blocked on moving forward and am wondering whether I should move off of 2020 LTS
     
  41. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    1,006
    We're still investigating. It looks like the DOTS build config system isn't aware of assembly overrides. Still need to confirm.
     
    adammpolak likes this.
  42. AdamBebko

    AdamBebko

    Joined:
    Apr 8, 2016
    Posts:
    168
    I don't know what the Dots Build system is, but I just wanted to confirm that this happens in the editor, without building anything at all. It's just in an empty project, no playmode, no nothing, just a sub scene that you unload.
     
    adammpolak likes this.
  43. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    @mcoted3d Are you still looking for more bug reports? Though I'm fairly certain my original report was basically along the lines of what adammpolak said, I'd be happy to make another if it has the chance of expediting narrowing down the cause, as it's has been like 8 months since I originally reported this :eek:
    Though its not an issue in 2021.2, unfortunately I am(and obviously others) required now to revisit this with the recent announcement of needing to downgrade to 2020 for DOTS
     
  44. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    Sorry don't mean to derail this thread, but what annoucement means that you need to downgrade to 2020 for DOTS?
     
  45. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    1,006
    If you don't have an active bug report for this issue already, please open one.
     
  46. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    995
    This one :

    https://forum.unity.com/threads/notice-on-dots-compatibility-with-unity-2021-1.1091800/

    I am in the same situation, I still have my open bug report 1312659. I've been contacted on htat subject and I'll try to provide the necessary info but since the reproduction steps are fairly easy as we can see in the above posts and the issue is no longer present in the 2021 version. I assume a backport would not be too complicated to do.

    This IMO is critical to do especcially since we'll have to stick with 2020 for a while...
     
    Last edited: May 10, 2021
    adammpolak likes this.
  47. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    Just submitted a new one, case 1335154
     
    adammpolak likes this.
  48. AdamBebko

    AdamBebko

    Joined:
    Apr 8, 2016
    Posts:
    168
    They closed my bug report immediately saying they already knew about it. Just FYI

    Case 133163
     
    adammpolak likes this.
  49. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    995
    I just updated my ticket with 2 identical project following the same steps described by @adammpolak.
    One was made using latest 2020 version and one with the latest 2021.1 version.
    The first one has the error, the second one does not.

    @mcoted3d given the number of users having the issue and the number of ticket probably created by said users. Maybe someone should link those ticket together somehow to avoid multiple unity ressource working on the subject.
     
    adammpolak likes this.
  50. Endlesser

    Endlesser

    Joined:
    Nov 11, 2015
    Posts:
    89
    Just marked here in case is solved:cool:

    ------------------------------Edit--------------------------------

    Well, I've got a good news and a bad news

    Bad news is, subscene + UIToolKit is still bumping and renders nothing with 2020.3.9f.

    Good news is, I figured out a way to keep both Subscene & UIToolKit working simultaneously at runtime. The trick is, modify your subscene with UIToolKit package removed, save your subscene, reinstall UIToolKit package, done.(strange as it sounds but works for me)

    Tips:
    1. Subscene stays integrated as long as you do not change subscene with UIToolKit package installed.
    2. You need to use Scripting Define Symbols to avoid error logs and error codes while UIToolKit is missing(If is necessary).
     
    Last edited: May 27, 2021
    Fribur likes this.