Search Issue Tracker
Fixed
Fixed in 2021.3.17f1, 2022.2.3f1, 2023.1.0a25
Votes
0
Found in
2023.1.0a21
Issue ID
UUM-20711
Regression
No
Improve error message when saving out side of project
When trying to save from the UI builder outside of the project directory this exception will happen and nothing else gets reported to the user. I think it would be great if the error message could be improved.
{code:java}
NullReferenceException: Object reference not set to an instance of an object
Unity.UI.Builder.VisualTreeAssetExtensions.DeepOverwrite (UnityEngine.UIElements.VisualTreeAsset vta, UnityEngine.UIElements.VisualTreeAsset other) (at C:/code/unity_trunk/External/MirroredPackageSources/com.unity.ui.builder/Editor/Utilities/VisualTreeAssetExtensions/VisualTreeAssetExtensions.cs:44)
Unity.UI.Builder.BuilderDocumentOpenUXML.PostSaveToDiskChecksAndFixes (System.String newUxmlPath, System.Boolean needsFullRefresh) (at C:/code/unity_trunk/External/MirroredPackageSources/com.unity.ui.builder/Editor/Builder/Document/BuilderDocumentOpenUXML.cs:1019)
Unity.UI.Builder.BuilderDocumentOpenUXML.SaveNewDocument (UnityEngine.UIElements.VisualElement documentRootElement, System.Boolean isSaveAs, System.Boolean& needsFullRefresh, System.String manualUxmlPath) (at C:/code/unity_trunk/External/MirroredPackageSources/com.unity.ui.builder/Editor/Builder/Document/BuilderDocumentOpenUXML.cs:466)
Unity.UI.Builder.BuilderDocument.SaveNewDocument (UnityEngine.UIElements.VisualElement documentRootElement, System.Boolean isSaveAs, System.Boolean& needsFullRefresh, System.String manualUxmlPath) (at C:/code/unity_trunk/External/MirroredPackageSources/com.unity.ui.builder/Editor/Builder/Document/BuilderDocument.cs:272)
Unity.UI.Builder.BuilderToolbar.SaveDocument (System.Boolean isSaveAs) (at C:/code/unity_trunk/External/MirroredPackageSources/com.unity.ui.builder/Editor/Builder/Toolbar/BuilderToolbar.cs:376)
Unity.UI.Builder.BuilderToolbar.<SetUpFileMenu>b__45_5 (UnityEngine.UIElements.DropdownMenuAction a) (at C:/code/unity_trunk/External/MirroredPackageSources/com.unity.ui.builder/Editor/Builder/Toolbar/BuilderToolbar.cs:508)
UnityEngine.UIElements.DropdownMenuAction.Execute () (at C:/code/unity_trunk/ModuleOverrides/com.unity.ui/Core/DropdownMenu.cs:189)
UnityEditor.UIElements.EditorMenuExtensions+<>c__DisplayClass0_0.<PrepareMenu>b__0 () (at C:/code/unity_trunk/Editor/Mono/UIElements/EditorMenuExtensions.cs:35)
UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, System.Int32 selected) (at C:/code/unity_trunk/Editor/Mono/GUI/GenericMenu.cs:127) {code}
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note (fix version 2022.2.3f1):
Fixed for 2022.2.X: Improve error message when saving out side of project
Resolution Note (fix version 2021.3.17f1):
Fixed for 2021.3.X: Improve error message when saving outside of project