Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Bug Latest UI Builder doesn't compile in 2020 LTS

Discussion in 'UI Toolkit' started by Baste, Mar 12, 2021.

  1. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,198
    upload_2021-3-12_8-35-31.png
     
    Orimay likes this.
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,198
    Wait, it compiles after removing and adding the package again.
     
  3. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,198
    But it doesn't compile if I close Unity and open it again. @antoine-unity, it looks like the UI Builder has this bug. These are the references for UIBuilderModule.asmdef:

    Code (csharp):
    1.  
    2.     "references": [
    3.         "UnityEngine.TextCoreModule",
    4.         "Unity.TextCore"
    5.     ],
    6.  
    Now, if you don't get this right in your own packages, made by the same team, then maaaybe you've made the wrong decision here?
     
    steinbitglis likes this.
  4. bguyl

    bguyl

    Joined:
    Sep 11, 2018
    Posts:
    4
    I can confirm, I have the same issue
    • Unity version: 2020.3.0f1
    • UI Builder version: 1.0.0-preview.12
     
  5. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    366
    Nearly every time I update Unity or update a package (not even related to uiToolkit) I get some kind of compile error related to ui builder or ui tookit. Removing and re-adding the ui builder packages fixes those errors. But that is really annoying.
     
    Midiphony-panda likes this.
  6. UpstreamAd

    UpstreamAd

    Joined:
    Jan 11, 2019
    Posts:
    10
    Have spotted this.

    Looking at the code it looks like this bit is making it unhappy?

    upload_2021-3-12_14-14-40.png
     
    tenukii and Baste like this.
  7. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,198
    Oh my God.

    Yeah, I was wrong. It's not my bug from earlier. It's just that nobody bothered to think when they wrote the code.

    @benoitd_unity, I know that using preview packages is a bit of a risk, but I was assuming that one of these things would be happening:
    - before a new Unity version shipped, some automated process checked if the latest version of packages - even preview packages - at least compiles. Not works. Not "passes unit tests". Just, you know, is valid code.
    - before a major version is shipped, teams check if the code they have shipped still compiles.

    Is that not the case? If it's not, maybe reconsider?
     
    PutridEx likes this.
  8. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    735
    Hey guys, thanks for reporting, we're looking into this.

    Can you confirm this happens with the com.unity.ui package preview.14?
     
  9. sinscorpion90

    sinscorpion90

    Joined:
    Oct 12, 2020
    Posts:
    3

    Unity 2020.3.0
     
  10. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,198
    Yup.
     
  11. sinscorpion90

    sinscorpion90

    Joined:
    Oct 12, 2020
    Posts:
    3
    work
    upload_2021-3-12_23-15-29.png
     
  12. tenukii

    tenukii

    Joined:
    Mar 31, 2014
    Posts:
    12
    Can confirm - 2020.3.0f and com.unity.ui package preview.14.
     
  13. osimaleki

    osimaleki

    Joined:
    Jan 15, 2020
    Posts:
    35
    So I am new to Unity so bare with me. I think this is only a short term fix until the bug is fixed but the bug is a simple one.

    You need to add another 'OR' to the logic around versioning and it will compile correctly.

    add the following at the end of the rest: ' || UNITY_2020_3'

    There are a few places but that should do it. Hope this helps :)
     
    manuelgoellnitz likes this.
  14. UpstreamAd

    UpstreamAd

    Joined:
    Jan 11, 2019
    Posts:
    10
    Yes. Although seems now fixed after updating the UIBuilder to v.13 - quick fix! Thanks!