Vertx.Debugging icon indicating copy to clipboard operation
Vertx.Debugging copied to clipboard

Can't draw anything other than Shape.Text

Open slender9168 opened this issue 2 years ago • 3 comments

Hi, Thanks for building this incredible library. I'm trying to use it in Unity 2022.3.2f1 Can't draw anything other than Shape.Text I'm getting this error:

NullReferenceException: Object reference not set to an instance of an object Vertx.Debugging.CommandBuilder.g__RenderShape|65_1[T] (Vertx.Debugging.AssetsUtility+Asset1[T] mesh, Vertx.Debugging.AssetsUtility+MaterialAsset material, Vertx.Debugging.CommandBuilder+ShapeBuffersWithData1[T] shape, System.Int32 groupCount, Vertx.Debugging.CommandBuilder+<>c__DisplayClass65_0& , Vertx.Debugging.CommandBuilder+<>c__DisplayClass65_1& ) (at Assets/Vertx.Debugging-master/Runtime/CommandBuilder/CommandBuilder.cs:281) Vertx.Debugging.CommandBuilder.g__RenderShapes|65_0 (Vertx.Debugging.CommandBuilder+<>c__DisplayClass65_0& ) (at Assets/Vertx.Debugging-master/Runtime/CommandBuilder/CommandBuilder.cs:263) Vertx.Debugging.CommandBuilder.FillCommandBuffer (UnityEngine.Rendering.CommandBuffer commandBuffer, UnityEngine.Camera camera, Vertx.Debugging.CommandBuilder+BufferGroup group, Vertx.Debugging.CommandBuilder+RenderingType renderingType) (at Assets/Vertx.Debugging-master/Runtime/CommandBuilder/CommandBuilder.cs:251) Vertx.Debugging.CommandBuilder.SharedRenderingDetails (UnityEngine.Camera camera, Vertx.Debugging.CommandBuilder+BufferGroup group, UnityEngine.Rendering.CommandBuffer& commandBuffer, Vertx.Debugging.CommandBuilder+RenderingType renderingType) (at Assets/Vertx.Debugging-master/Runtime/CommandBuilder/CommandBuilder.cs:214) Vertx.Debugging.CommandBuilder.ExecuteDrawRenderPass (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.CommandBuffer commandBuffer, UnityEngine.Camera camera) (at Assets/Vertx.Debugging-master/Runtime/CommandBuilder/CommandBuilder.cs:164) Vertx.Debugging.VertxDebuggingRenderPass.Execute (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData) (at Assets/Vertx.Debugging-master/Runtime/Passes/VertxDebuggingPass.URP.cs:50) UnityEngine.Rendering.Universal.ScriptableRenderer.ExecuteRenderPass (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.ScriptableRenderPass renderPass, UnityEngine.Rendering.Universal.RenderingData& renderingData) (at ./Library/PackageCache/[email protected]/Runtime/ScriptableRenderer.cs:1490) UnityEngine.Rendering.Universal.ScriptableRenderer.ExecuteBlock (System.Int32 blockIndex, UnityEngine.Rendering.Universal.ScriptableRenderer+RenderBlocks& renderBlocks, UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData, System.Boolean submit) (at ./Library/PackageCache/[email protected]/Runtime/ScriptableRenderer.cs:1446) UnityEngine.Rendering.Universal.ScriptableRenderer.Execute (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData) (at ./Library/PackageCache/[email protected]/Runtime/ScriptableRenderer.cs:1248) UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.CameraData& cameraData, System.Boolean anyPostProcessingEnabled) (at ./Library/PackageCache/[email protected]/Runtime/UniversalRenderPipeline.cs:650) UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderSingleCameraInternal (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera camera) (at ./Library/PackageCache/[email protected]/Runtime/UniversalRenderPipeline.cs:534) UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List1[T] cameras) (at ./Library/PackageCache/[email protected]/Runtime/UniversalRenderPipeline.cs:376) UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List1[T] cameras) (at :0) UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, UnityEngine.Object renderRequest, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at :0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

slender9168 avatar Nov 13 '23 18:11 slender9168

Have you found a solution ?

Looking at where the exception occurs, it seems that the package gets a null material for the ArcMaterial while trying to draw a circle.

The package tries to find a shader and create a material using it at the following specific location: Packages/com.vertx.debugging/Editor/Assets/VertxArc.shader

First make sure that the file above exists at the specified location. Maybe you put the package at a different path?

The second possibility could be that Unity fails when trying to create the material. Do you have any other errors inside the Console?

stefanbursuc avatar Nov 27 '23 18:11 stefanbursuc

I presume you're not seeing this on your end @stefanbursuc ? I'm overseas and have limited free time, but unless there's multiple people having this issue, I can only imagine there's been some corruption or odd installation. Perhaps you've downloaded from git and failed to download the assets?

vertxxyz avatar Nov 27 '23 18:11 vertxxyz

I didn't even downloaded the package yet 😃. I just checked the Issues to see what kind of problems people had with it and this call stack got me curios and I just followed the calls on github 😅 .

stefanbursuc avatar Nov 27 '23 18:11 stefanbursuc