NullReferenceException: Object reference not set to an instance of an object?
I am doing docs on the website(https://acegikmo.com/shapes/docs).
The first below code is working well.
But If I use PolyLine or Disc, then I am getting the below errors.
Could you please help with this issue?
Working Code
Not Working Code
Errors
NullReferenceException: Object reference not set to an instance of an object
Shapes.Draw.Polyline_Internal (Shapes.PolylinePath path, System.Boolean closed, Shapes.PolylineGeometry geometry, Shapes.PolylineJoins joins, System.Single thickness, Shapes.ThicknessSpace thicknessSpace, UnityEngine.Color color) (at Assets/Shapes/Scripts/Runtime/Immediate Mode/Draw.cs:86)
ReactDisc.DrawShapes (UnityEngine.Camera cam) (at Assets/Scripts/ReactDisc.cs:37)
Shapes.ImmediateModeShapeDrawer.OnCameraPreRender (UnityEngine.Camera cam) (at Assets/Shapes/Scripts/Runtime/Immediate Mode/ImmediateModeShapeDrawer.cs:30)
Shapes.ImmediateModeShapeDrawer.DrawShapesSRP (UnityEngine.Rendering.ScriptableRenderContext ctx, UnityEngine.Camera cam) (at Assets/Shapes/Scripts/Runtime/Immediate Mode/ImmediateModeShapeDrawer.cs:37)
UnityEngine.Rendering.RenderPipelineManager.BeginCameraRendering (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera camera) (at <9ae153a4144543aca4f16814b7ce3264>:0)
UnityEngine.Rendering.RenderPipeline.BeginCameraRendering (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera camera) (at <9ae153a4144543aca4f16814b7ce3264>:0)
UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List`1[T] cameras) (at Library/PackageCache/com.unity.render-pipelines.universal@14.0.11/Runtime/UniversalRenderPipeline.cs:376)
UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) (at <9ae153a4144543aca4f16814b7ce3264>:0)
UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, UnityEngine.Object renderRequest, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at <9ae153a4144543aca4f16814b7ce3264>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Not Disc.
Only PolyLine.