Search Unity

Build errors in Canvas

Discussion in 'Unity Hub' started by MachairaJP, Oct 25, 2021.

  1. MachairaJP

    MachairaJP

    Joined:
    Jan 31, 2014
    Posts:
    30
    I had to copy the AndroidPlayer playbackengine folder from a new version on another machine than the 2019.4.29f1 version I'm using as Unity Hub refuses to install the Android components (I'm uninstalled and reinstalled 5 times :( ) and now when attempting to build the Android version I'm getting weird errors:

    Library\PackageCache\com.unity.ugui@1.0.0\Runtime\UI\Core\Layout\CanvasScaler.cs(241,20): error CS0117: 'Canvas' does not contain a definition for 'preWillRenderCanvases'
    Library\PackageCache\com.unity.ugui@1.0.0\Runtime\UI\Core\Layout\CanvasScaler.cs(253,20): error CS0117: 'Canvas' does not contain a definition for 'preWillRenderCanvases'
    Library\PackageCache\com.unity.ugui@1.0.0\Runtime\UI\Core\Layout\CanvasScaler.cs(302,43): error CS1061: 'Canvas' does not contain a definition for 'renderingDisplaySize' and no accessible extension method 'renderingDisplaySize' accepting a first argument of type 'Canvas' could be found (are you missing a using directive or an assembly reference?)

    Any ideas why I'm getting this? Seems unrelated to a platform. The Windows version builds just fine.
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,899
    You cannot copy playbackengine from a different Unity version, the errors you're seeing might be the side effect of this.

    Not sure what's the issue with hub, but try manually deleting Unity installation folder and then attempt the install. In case of file lockage, restart PC, before deleting.
     
  3. MachairaJP

    MachairaJP

    Joined:
    Jan 31, 2014
    Posts:
    30
    Completely deleted the old folder, attempted to reinstall and got the same error for the 6th time:

    upload_2021-10-25_21-53-41.png

    Plenty of space on the install drive, so I know it's not that, but since I have no idea what "Validation Failed" means I don't know where to go from here. :(
     
  4. MachairaJP

    MachairaJP

    Joined:
    Jan 31, 2014
    Posts:
    30
    What's worse, Unity Hub thinks everything installed fine:

    upload_2021-10-25_21-57-41.png
     
  5. MachairaJP

    MachairaJP

    Joined:
    Jan 31, 2014
    Posts:
    30
    And I get this wonderful message when I open my project:

    upload_2021-10-25_21-59-12.png
     
  6. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,899
    I see you're using HUB Beta, there's might be an issue with HUB itself. I'll move your thread to Hub area.

    If possible try using non beta version of the Hub
     
  7. Gennady

    Gennady

    Unity Technologies

    Joined:
    Mar 30, 2015
    Posts:
    44
    It's hard to say without seeing log files, but could you please try this:

    - Uninstall Editor (and remove the installation folder if it still exists)
    - Install Editor with "Android Build Support" module only
    - Add Android submodules
     
  8. MachairaJP

    MachairaJP

    Joined:
    Jan 31, 2014
    Posts:
    30
    The non-beta version of the Hub doesn't allow me to set the download location, so I can't use it as I don't have the GBs free on my C drive. :(
     
  9. SonuIxia

    SonuIxia

    Joined:
    Sep 3, 2018
    Posts:
    16