after crating an UI with UIBuilder everything is fine, the build work properly fine, out of the Editor as well as from the console.
But when I remove the “Library” folder, like in a CI, the build is also succsessful but the UI is no longer there or damaged (shrinked).
In this state, I can not fix it in the Editor as well.
Im am using:
2020.3.17f1,
UIToolkit 1.0.0.preview.17
UIBuilder 1.0.0.preview.17
VectorGraphics 2.0.0.preview.17
Note: I reduced the sample to only one VisualElement in the tree, only inline style, no extern uss, no graphics or other elements. It seams to me that there is an underlaying mechanism working…
Are there any other errors in the Editor.log file when the problem occurs?
Also, does it only occur in CI? Some CI jobs run Unity with the -no-graphics command-line option, which is known to cause import issues with some SVG assets. This could be part of the problem.
Thank you for answering.
I attached the hole project and inside the zip the Editor.log. I can not say if the output points to a serious error, it does not look like to me…
CI is independent of the behaviour. (We have explicid machines witch supports Unity-Build with GFX support.)
It occurs just by starting the project in the Editor or in the build made from the Editor, local build via console or, in the end, via CI. So it seams to be something else.
I removed the dependency to the Vectorgraphics-package but it does not affect the behaviour.
However, I hope you can find some hints that helps to find the problem.
Hi, I ran your project here, can you try reimporting the Assets/UI Toolkit/UnityThemes/UnityDefaultRuntimeTheme.tss asset? I suspect this is what’s up now, though it shouldn’t be happening, I agree
Just to say we’ve been experiencing the same thing and use Create->UI Toolkit->Panel Settings Asset to force a reimport - I guess of UnityDefaultRuntimeTheme.tss
We already have a fix being worked on, and an update of the package is planned for soon but we don’t yet have a date. Thanks for confirming this fixed the problem!
(Note: ReImport() calls in the end AssetDatabase.ImportAsset())
After running this I have to call the hole build call from the CI again to fix the bug. Only one call is not enough.
I also tryed to call ReImport() and BuildPlayer() in the same script just another time but this seams to be a difference because it does not fix the bug?!
What will be the correct way to call ReImportAsset() and BuildPlayer() in my build script?