You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've generated a list of Vector2 from a Voronoi generator.
Each Vector2 is a vertex of a Voronoi cell, ordered clockwise.
The triangulation builds a few meshes, then I get this error:
NullReferenceException: Object reference not set to an instance of an object
mattatz.Triangulation2DSystem.Triangulation2D.RefineSubRoutine (System.Single angle, System.Single threshold) (at Assets/scripts/Triangulation2D/Triangulation2D.cs:331)
mattatz.Triangulation2DSystem.Triangulation2D.Refine (System.Single angle, System.Single threshold) (at Assets/scripts/Triangulation2D/Triangulation2D.cs:320)
mattatz.Triangulation2DSystem.Triangulation2D.Triangulate (UnityEngine.Vector2[] points, System.Single angle, System.Single threshold) (at Assets/scripts/Triangulation2D/Triangulation2D.cs:181)
mattatz.Triangulation2DSystem.Triangulation2D..ctor (mattatz.Triangulation2DSystem.Polygon2D polygon, System.Single angle, System.Single threshold) (at Assets/scripts/Triangulation2D/Triangulation2D.cs:44)
Region..ctor (UnityEngine.Vector2 spawn, System.Collections.Generic.List`1[T] vertices) (at Assets/scripts/Region.cs:23)
VoronoiDemo.Generate () (at Assets/scripts/VoronoiDemo.cs:80)
VoronoiDemo.OnValidate () (at Assets/scripts/VoronoiDemo.cs:51)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
The text was updated successfully, but these errors were encountered:
Hi, I had the same issue, for now I locally just added a guard clause to RefineSubRoutine if "skinny is null", that worked so far.
Did not dig deeper, but I prepared a sample for reproduction:
I've generated a list of Vector2 from a Voronoi generator.
Each Vector2 is a vertex of a Voronoi cell, ordered clockwise.
The triangulation builds a few meshes, then I get this error:
The text was updated successfully, but these errors were encountered: