Search Unity

Resolved Compilation Errors After Installing Package com.unity.ui@1.0.0-preview.15

Discussion in 'UI Toolkit' started by peterdfinn, Aug 12, 2021.

  1. peterdfinn

    peterdfinn

    Joined:
    Aug 15, 2018
    Posts:
    5
    I've installed Unity version 2021.2.0b6, which is currently in Beta, and I've installed the package com.unity.ui@1.0.0-preview.15. As soon as it finishes installing, I get two console errors that prevent compilation:
    Library\PackageCache\com.unity.ui@1.0.0-preview.15\Core\Renderer\UIRenderer\UIRenderers.cs(128,29): error CS0117: 'Utility' does not contain a definition for 'ProfileImmediateRendererBegin'
    Library\PackageCache\com.unity.ui@1.0.0-preview.15\Core\Renderer\UIRenderer\UIRenderers.cs(141,29): error CS0117: 'Utility' does not contain a definition for 'ProfileImmediateRendererEnd'

    I searched for methods called ProfileImmediateRendererBegin() and ProfileImmediateRendererEnd() in the C# files in this package, but I couldn't find them. Is there another place these methods are supposed to be found? Are the names incorrect? Errors encountered upon installing UI Toolkit package.png
     
  2. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    780
    You should remove the com.unity.ui package since it's part of 2021.2 now.
    See this guide: https://forum.unity.com/threads/ui-toolkit-migration-guide.1138621/
     
  3. peterdfinn

    peterdfinn

    Joined:
    Aug 15, 2018
    Posts:
    5
    Oh, I see. Sorry, I somehow got the impression that only some aspects of the UI Toolkit were part of the engine now, and that others still required the package.
     
  4. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    700
    For Unity 2020.3 and 2021.1, this is true! For 2021.2 and up, Runtime UI Toolkit (the missing part for the previous version) is now a part of the main product, and it has new UI Toolkit features that are not available with the package (like USS Transitions).
     
    jessespectar likes this.