Search Issue Tracker
Fixed in 2021.3.17f1
Fixed in 2021.3.X, 2022.2.X, 2023.1.X, 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
- Assets are created in the Package folders when creating assets via custom buttons in the Inspector window or other windows
- “Select” windows are named differently on Windows and macOS
- [Windows] No minimum “Select” window size
- Enabling “Editor Extension Authoring” in UI Builder doesn’t dirty the document and saving with shortcut doesn’t persist the state
- WebRequest.Create() function fails with "URI prefix is not recognized" errors when the project is built for Linux Standalone or Windows Dedicated Server
Resolution Note (fix version 2022.2):
Fixed for 2022.2.X: Improve error message when saving out side of project
Resolution Note (fix version 2021.3):
Fixed for 2021.3.X: Improve error message when saving outside of project