Search Issue Tracker

Fixed in 4.3.0-preview.4

Votes

0

Found in [Package]

4.3.0-preview.1, 4.1.2, 3.0.0

Issue ID

1209522

Regression

No

[ProBuilder] ArgumentNullException is thrown on selecting "Edit Poly Shape" button from the "PolyShape" preset

Package: Probuilder

-

On changing properties under the "PolyShape" preset throws ArgumentNullException, refer the attached video.

Steps to repro:
1. Create a new project.
2. Window > Package Manager > ProBuilder > Install
3. Tools > ProBuilder > ProBuilder Window
4. Create a "New Poly Shape" in the scene view using "New Poly Shape" tool
5. Hierarchy > New Game Object > Inspector > Create preset of "Poly Shape (Script)" component
6. Project > PolyShape > Inspector > Edit Poly Shape button > click

Actual Result:
ArgumentNullException is thrown

Expected Result:
PolyShape should allow to edit without throwing any exception

Tested on Unity version:
2020.1.0a18, 2019.3.0f5

Package version occurring: 4.3.0-preview.1, 4.2.1, 4.1.2, 4.0.2, 3.0.0

Environment:
Windows 10 and macOS 10.14.

Stack trace:
ArgumentNullException: Value cannot be null.
Parameter name: mesh
UnityEngine.ProBuilder.MeshOperations.AppendElements.CreateShapeFromPolygon (UnityEngine.ProBuilder.ProBuilderMesh mesh, System.Collections.Generic.IList`1[T] points, System.Single extrude, System.Boolean flipNormals, System.Collections.Generic.IList`1[T] holePoints) (at Library/PackageCache/com.unity.probuilder@4.3.0-preview.1/Runtime/MeshOperations/AppendElements.cs:381)
UnityEngine.ProBuilder.MeshOperations.AppendElements.CreateShapeFromPolygon (UnityEngine.ProBuilder.ProBuilderMesh mesh, System.Collections.Generic.IList`1[T] points, System.Single extrude, System.Boolean flipNormals) (at Library/PackageCache/com.unity.probuilder@4.3.0-preview.1/Runtime/MeshOperations/AppendElements.cs:245)
UnityEngine.ProBuilder.MeshOperations.AppendElements.CreateShapeFromPolygon (UnityEngine.ProBuilder.PolyShape poly) (at Library/PackageCache/com.unity.probuilder@4.3.0-preview.1/Runtime/MeshOperations/AppendElements.cs:220)
UnityEditor.ProBuilder.PolyShapeEditor.RebuildPolyShapeMesh (System.Boolean vertexCountChanged) (at Library/PackageCache/com.unity.probuilder@4.3.0-preview.1/Editor/EditorCore/PolyShapeEditor.cs:215)
UnityEditor.ProBuilder.PolyShapeEditor.SetPolyEditMode (UnityEngine.ProBuilder.PolyShape+PolyEditMode mode) (at Library/PackageCache/com.unity.probuilder@4.3.0-preview.1/Editor/EditorCore/PolyShapeEditor.cs:201)
UnityEditor.ProBuilder.PolyShapeEditor.OnInspectorGUI () (at Library/PackageCache/com.unity.probuilder@4.3.0-preview.1/Editor/EditorCore/PolyShapeEditor.cs:115)
UnityEditor.Presets.PresetEditor.DrawInternalInspector () (at <abcb5714b99e4fb3a117425953eb603c>:0)
UnityEditor.Presets.PresetEditor.DrawPresetData () (at <abcb5714b99e4fb3a117425953eb603c>:0)
UnityEditor.Presets.PresetEditor.OnInspectorGUI () (at <abcb5714b99e4fb3a117425953eb603c>:0)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <abcb5714b99e4fb3a117425953eb603c>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.