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
- Search field in UI Builder's Library has no character limit
- Changing the value in UI Builder by dragging increases it by a few thousand points when reaching the borders of the screen
- ARM64 architecture DLL incorrectly copied instead of x64 when building for Windows x64
- Crash on TypeTreeIterator::GetNode when opening a specific folder
- Crash on WriteSerializedAssetsV2 when (re)entering the Play Mode in a specific project when IEnumerator Start() is used
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