Steps to reproduce:
- Open any Project and import the attached Font
- Create a UI Document and open it
- Add anything to the Hierarchy and in the Element's Inspector change Text Font to the attached Font and save the Document
- Delete the imported Font from the Project Browser and observe the Console
- Open the UI Document and manipulate it in any way
Actual results:
Once the Font Asset is deleted from the Project, Warnings appear:
"Assets/NewUXMLTemplate.uxml (line 3): warning: Invalid asset path: 'project://database/Assets/gomarice_no_continue.ttf?fileID=12800000&guid=8ed0e0fc825a27b459005b5cfcfc47bc&type=3#gomarice_no_continue'
UnityEditor.ProjectBrowser:DeleteSelectedAssets (bool)"
": Semantic - USS in 'style' attribute is invalid: Assets/NewUXMLTemplate.uxml (line 3): warning: Invalid asset path: 'project://database/Assets/gomarice_no_continue.ttf?fileID=12800000&guid=8ed0e0fc825a27b459005b5cfcfc47bc&type=3#gomarice_no_continue'
UnityEditor.ProjectBrowser:DeleteSelectedAssets (bool)"
"Invalid value for font MissingAssetReference
UnityEngine.UIElements.VisualElement:UpdateInlineRule (UnityEngine.UIElements.StyleSheet,UnityEngine.UIElements.StyleRule)
Unity.UI.Builder.VisualTreeAssetLinkedCloneTree:CloneSetupRecursively"
"Invalid value for font MissingAssetReference
UnityEngine.UIElements.VisualElement:UpdateInlineRule"
Then after whenever anything is done in UI Builder and the Element from which the Font was removed still exists the last Warnings are spammed (Also happens when selecting the Asset or the Asset is manipulated in any way)
Workaround is to assign a new Asset (Cannot be None) and only then set it to None
Expected results: A Unified Warning appears that the used Font is no longer available and users are indicated with which Element in the Hierarchy the problem lies, as currently if the UI Document is large users would have to go through every element and also know that when the Font is set to None that that is the problematic Element or go through Code and see which line is using the Asset Path provided in Warnings
Reproducible with versions: 6000.0.60f1, 6000.2.8f1, 6000.3.0b5, 6000.4.0a2
Tested on (OS): Windows 11