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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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