This has been bothering me for a while, thought preview 8 would fix it but it hasn't. Basically the imports field is null for DefaultCommonDark_verdana.uss in 2020.2 and throws nulls (stops package manager loading for one.) Diffing to DefaultCommonDark_lucida granda.uss Stands out that it's not set
Hi, Sorry for the (very) late reply. Were you able to fix the problem on your side? I double-checked on our end, looks like the asset file (DefaultCommonDark_verdana.uss.asset) contains the lines that are missing on your side. As a side note, all generated files found in com.unity.ui/PackageResources/StyleSheets/Generated all go through the same scripted process so there should be no difference in the common metadata like those two lines you are missing. Did you try to delete your Library folder? Also worth clearing your <User>\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.ui@1.0.0-preview8\PackageResources\StyleSheets\Generated folder. Let us know if it still fails, Sebastien
Actually I take that back, I thought it was fixed but I just hadn't switched back to using verdana. Opening package manager still throws the error Code (CSharp): NullReferenceException: Object reference not set to an instance of an object UnityEditor.StyleSheets.StyleSheetResolver.ResolveImports (UnityEngine.UIElements.StyleSheet sheet) (at <3d7c86b365634083bceadac5c7f36490>:0) UnityEditor.StyleSheets.StyleSheetResolver.ResolveSheets () (at <3d7c86b365634083bceadac5c7f36490>:0) UnityEditor.StyleSheets.StyleSheetResolver.Resolve () (at <3d7c86b365634083bceadac5c7f36490>:0) UnityEditor.StyleSheets.StyleSheetResolver.ResolveTo (UnityEngine.UIElements.StyleSheet dest) (at <3d7c86b365634083bceadac5c7f36490>:0) UnityEditor.PackageManager.UI.ResourceLoader.LoadAndResolveStyleSheet (System.Boolean isDarkTheme) (at <5497e23e3a5c408c81d429836550622e>:0) UnityEditor.PackageManager.UI.ResourceLoader.get_darkStyleSheet () (at <5497e23e3a5c408c81d429836550622e>:0) UnityEditor.PackageManager.UI.ResourceLoader.GetMainWindowStyleSheet () (at <5497e23e3a5c408c81d429836550622e>:0) UnityEditor.PackageManager.UI.PackageManagerWindowRoot..ctor (UnityEditor.PackageManager.UI.ResourceLoader resourceLoader, UnityEditor.PackageManager.UI.SelectionProxy selection, UnityEditor.PackageManager.UI.PackageFiltering packageFiltering, UnityEditor.PackageManager.UI.PackageManagerPrefs packageManagerPrefs, UnityEditor.PackageManager.UI.PackageDatabase packageDatabase, UnityEditor.PackageManager.UI.PageManager pageManager, UnityEditor.PackageManager.UI.PackageManagerProjectSettingsProxy settingsProxy, UnityEditor.PackageManager.UI.UnityConnectProxy unityConnectProxy, UnityEditor.PackageManager.UI.ApplicationProxy applicationProxy) (at <5497e23e3a5c408c81d429836550622e>:0) UnityEditor.PackageManager.UI.PackageManagerWindow.OnEnable () (at <5497e23e3a5c408c81d429836550622e>:0) UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String) UnityEditor.WindowLayout:LoadDefaultWindowPreferences() Going to nuke everything as suggested
Nope still an issue after deleting the cache (\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.ui@1.0.0-preview9), the copy in the project (Library\PackageCache\com.unity.ui@1.0.0-preview.9) and let the package manager redownload them. The imports: [] and m_flattenedImportedSytleSheets: [] fields are still missing I've attached the file that I got from the package manager. I also checked on a completely fresh machine and had same issue. This is only an issue in 2020.2 (not 2020.1)