Hello! Itâs not clear from your post whether youâre using packages or not, but if youâre using the com.unity.ui package we recommend you also install the UI Builder package (com.unity.ui.builder), even if there is already a UI Builder built into Unity 2021.1.
OK, so, itâs a bit confusing⌠at least for runtime UI development.
UI Builder is the tool used to build UI Toolki layouts, and it comes pre-installed w/ unity since 2021.
UI Toolkit is preview so I need to install it from a separate package feed and it (aparently) does not work with pre-installed UI Builder, so I need to install preview package of it as well - right?
Partially correct. UI Toolkit is a core part of Unity for a while (2019), but Runtime support has been added last year by using the package that is preview. With Unity 2021.2+, UI Toolkit Runtime support is also part of the core product (and you donât use the package with 2021.2+).
Although using the UI Toolkit package in 2021.1 with the built in UI Builder version may work, there may also be internal changes made after the Unity version was released and therefore we make sure to keep the UI Builder package updated to work with the UI Toolkit package at all times, therefore itâs recommended that if youâre using one of them from the package, you use both packages together.
This did not resolve the issue for me. Iâm using Unity 2021.1.10f1. After ensuring both packages
I get the following error message:
Library\PackageCache\com.unity.ui.builder@1.0.0-preview.17\Editor\Builder\Utilities\BuilderAssetUtilities.cs(527,37): error CS0117: âFileUtilâ does not contain a definition for âWriteTextFileToDiskâ
This fixed my issue. This was very confusing since UI Toolkit is built in recent Unity builds but doesnât contain runtime support and so you have to get the preview package. And to get the preview package you have to import: com.unity.ui.builder
@JuliaP_Unity , I ran into this now. I installed everything in the way that the documentation asked me to. Could you please add information to the documentation that we also have to install the builder package for it to be functional? Following the instructions and getting exceptions on startup isnât the best experience.