Search Issue Tracker
Fixed in 5.0.0
Votes
0
Found in [Package]
4.4.0, 4.3.1, 4.2.3, 4.2.1, 4.1.0, 4.0.2
Issue ID
1283067
Regression
No
[ProBuilder] ArgumentNullException on replacing a prefab while exporting it from ProBuilder window
When Prefab GameObject is exported and replaced with existing Prefab Asset then it causes the editor to throw ArgumentNullException, Refer attached video.
Steps to repro:
1. Create a new project.
2. Window > Package Manager > ProBuilder > Install
3. Tools > ProBuilder > ProBuilder window > Create a New Shape
4. Darg and drop "New Shape" to Project window for making a Prefab
5. Select a New Shape Prefab in the Hierarchy window
6. ProBuilder window > Export > Prefab > Save and Replaced existed asset
Actual Result:
ArgumentNullException is thrown when the existing Prefab object is exported, saved, and replaced.
Expected Result:
Prefab asset is exported, saved, and replaced gracefully
Occurring on:
2020.2.0b6, 2020.1.7f1, 2019.4.12f1, 2018.4.27f1
Note: Prefab Export functionality is introduced in the Package version 4.0.2
Package found version: 4.4.0, 4.3.1, 4.2.3, 4.2.1, 4.1.0, 4.0.2
Environment:
Occurring on Windows 10 & macOS 10.15.
Stack trace:
ArgumentNullException: Value cannot be null.
Parameter name: mesh
UnityEditor.ProBuilder.EditorUtility.SynchronizeWithMeshFilter (UnityEngine.ProBuilder.ProBuilderMesh mesh) (at Library/PackageCache/com.unity.probuilder@4.4.0/Editor/EditorCore/EditorUtility.cs:193)
UnityEditor.ProBuilder.Actions.ExportAsset.ExportPrefab (System.String path, UnityEngine.ProBuilder.ProBuilderMesh pb, System.Boolean replaceOriginal, System.Boolean batchExport) (at Library/PackageCache/com.unity.probuilder@4.4.0/Editor/MenuActions/Export/ExportAsset.cs:258)
UnityEditor.ProBuilder.Actions.ExportAsset.ExportPrefab (UnityEngine.ProBuilder.ProBuilderMesh mesh, System.Boolean replaceOriginal) (at Library/PackageCache/com.unity.probuilder@4.4.0/Editor/MenuActions/Export/ExportAsset.cs:159)
UnityEditor.ProBuilder.Actions.ExportAsset.ExportWithFileDialog (System.Collections.Generic.IList`1[T] meshes, UnityEditor.ProBuilder.Actions.ExportAssetOptions options) (at Library/PackageCache/com.unity.probuilder@4.4.0/Editor/MenuActions/Export/ExportAsset.cs:75)
UnityEditor.ProBuilder.Actions.Export.DoAction () (at Library/PackageCache/com.unity.probuilder@4.4.0/Editor/MenuActions/Export/Export.cs:211)
UnityEditor.ProBuilder.Actions.Export.OnSettingsGUI () (at Library/PackageCache/com.unity.probuilder@4.4.0/Editor/MenuActions/Export/Export.cs:124)
UnityEditor.ProBuilder.MenuOption.OnGUI () (at Library/PackageCache/com.unity.probuilder@4.4.0/Editor/EditorCore/MenuOption.cs:78)
UnityEditor.HostView.OldOnGUI () (at <3f87d5057260449492001887e23ef996>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <17eda2bc62404501b9f55a9eba6f522e>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <931b26b61f444e3485195721b0227b20>:0)
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note (fix version 5.0.0):
https://github.com/Unity-Technologies/com.unity.probuilder/pull/344