Search Issue Tracker

Active

Under Consideration for 6000.0.X, 6000.2.X, 6000.3.X, 6000.4.X

Votes

0

Found in

6000.0.60f1

6000.2.8f1

6000.3.0b5

6000.4.0a2

Issue ID

UUM-121676

Regression

No

Invalid asset path & Invalid value for font MissingAssetReference Warnings are spammed when deleting a Font used by any Element in UI Builder

-

Steps to reproduce:

  1. Open any Project and import the attached Font
  2. Create a UI Document and open it
  3. Add anything to the Hierarchy and in the Element's Inspector change Text Font to the attached Font and save the Document
  4. Delete the imported Font from the Project Browser and observe the Console
  5. 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

Add comment

Log in to post comment