Recently I am getting an NullReferenceException (see screenshot), whenever I want to create a new UIDocument Asset. Reinstalling the UI Toolkit and deleting the Library folder does not help.
I cannot reproduce this error in a clean project, but I just cant figure out what causes this exception in this particular project. Did anyone have this problem yet?
I am working with Unity 2020.1.7 and the latest package versions.
Do you have any custom Visual Element definition in your project? With UxmlFactory and UxmlTraits?
Yes, we have custom Visual Elements in the project. The factories are very basic. I checked them and was able to resolve the problem, thank you very much!
For anyone who might search for the same issue: I just implemented a blank getter in the uxmlChildElementsDescription and didnt include a yield break in it.
Thank you very much for pointing out the source of the excpetion!
1 Like