A* Pathfinding Project

Problem with 4.3.10 beta & HDRP - no graph display


#1

hey guys.

anyone have a problem seeing the graph in 4.3.10beta?

Unity ver 2019.3.0.b11

everything else appears to be working.

toggling “Show Graphs” does nothing.

all layers are shown in scene view.

any ideas? it seems like it may be a shader issue as I am on HDRP?


#2

Hi

Fixed now in beta 4.3.11. Thank you for reporting this!
The package will be online in a few minutes at https://www.arongranberg.com/astar/download


#3

I seem to be having the same issue on URP. I don’t get a graph at all with 4.3.11

Unity v 2019.3.0f1
Burst v1.1.2
Math v1.1.0
Entities v0.4.0
Collections v0.4.0
Jobs v0.2.2

I have a grid size of 150x150 with a node size of 1. I don’t see a grid like in the video, I tried clicking scan and unclicking and re-clicking the Show Graphs toggle.

Any ideas what I could be doing wrong. I have just started, so it’s possible I’m missing something fundamental.

Thanks for your help!


#4

I tried again with a blank project (with the default render pipeline this time) and it is working fine (The Universal Render Pipeline is still not working for me), so I do think the combination of 4.3.11 beta and URP might be a problem


#5

@AshMcConnell
Are you using the latest version of the URP? There is a bug in the URP in older versions that prevents it from working.


#6

Yeah, on version 7.1.6 at the moment - it seems to be the latest one


#7

Hi

Strange. I cannot replicate this issue.
I am have tried with both HDRP and URP with version 7.1.5, 7.1.6 and 7.1.7 (latest). All seem to work fine for me.
Have you checked the example scenes?


#8

Sorry for the late reply, I didn’t seem to get a notification.

It seems to be working on my test scene now, but not in my game yet. I’m not sure why it didn’t work before. I’ll try and get a bit of time to do more debugging over the next week.

Thanks!


#9

Gizmos are never visible in games? They are only supposed to be visible in the Unity editor.


#10

Sorry, I meant in my main game project. I got it working last night within that project. Thanks for your help! :slight_smile:


#11

I was having issues with it throwing an exception when I changed the grid height / width in the editor. It seemed to think another scan was happening at the same time - it might have been because I had another editor open and was comparing projects at the time.

I can try again tonight if it would help
Thanks again!


#12

Do you think you could post the stacktrace?

Ah. Did you have to do anything specific to get it to work?


#13

I’m not sure exactly what the problem was. It wasn’t showing at all, I restarted the unity editor and it started showing.

I think it threw the exception when I set the grid width or height to 0, or it might have been a coincidence. I’ll try and get a stacktrace to help tonight.


#14

Here is the stack trace: -

NullReferenceException: Object reference not set to an instance of an object
AstarPath+<>c__DisplayClass97_0.<RecalculateDebugLimits>b__0 (Pathfinding.GraphNode node) (at Assets/AstarPathfindingProject/Core/AstarPath.cs:722)
Pathfinding.GridGraph.GetNodes (System.Action`1[T] action) (at Assets/AstarPathfindingProject/Generators/GridGenerator.cs:155)
AstarPath.RecalculateDebugLimits () (at Assets/AstarPathfindingProject/Core/AstarPath.cs:721)
AstarPath.DrawGizmos () (at Assets/AstarPathfindingProject/Core/AstarPath.cs:792)
Drawing.RetainedGizmosWrapper.DrawGizmos (System.Boolean usingRenderPipeline) (at Assets/AstarPathfindingProject/Drawing/RetainedGizmosWrapper.cs:300)
UnityEngine.Debug:LogException(Exception, Object)
Drawing.RetainedGizmosWrapper:DrawGizmos(Boolean) (at Assets/AstarPathfindingProject/Drawing/RetainedGizmosWrapper.cs:302)
Drawing.RetainedGizmosWrapper:Submit(Camera, CommandBuffer, Boolean) (at Assets/AstarPathfindingProject/Drawing/RetainedGizmosWrapper.cs:347)
Drawing.RetainedGizmosWrapper:SubmitFrame(Camera, CommandBuffer, Boolean) (at Assets/AstarPathfindingProject/Drawing/RetainedGizmosWrapper.cs:222)
Drawing.RetainedGizmosWrapper:EndCameraRendering(ScriptableRenderContext, Camera) (at Assets/AstarPathfindingProject/Drawing/RetainedGizmosWrapper.cs:180)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

It happened when I changed the node size to nothing momentarily (although when I tried to reproduce it for a video I couldn’t get it to happen again): -

I got another error: -

Hope this helps!

Edit: - Here is the exception with the burst compiler turned off: -

Exception: Exception of type 'System.Exception' was thrown.
Pathfinding.Jobs.JobCopyRectangle`1[T].Assert (System.Boolean value) (at Assets/AstarPathfindingProject/Generators/Utilities/UtilityJobs.cs:97)
Pathfinding.Jobs.JobCopyRectangle`1[T].Copy (Unity.Collections.NativeArray`1[T] input, Unity.Collections.NativeArray`1[T] output, Pathfinding.Int2 inputSize, Pathfinding.Int2 outputSize, Pathfinding.IntRect inputBounds, Pathfinding.IntRect outputBounds) (at Assets/AstarPathfindingProject/Generators/Utilities/UtilityJobs.cs:103)
Pathfinding.Jobs.JobCopyRectangle`1[T].Execute () (at Assets/AstarPathfindingProject/Generators/Utilities/UtilityJobs.cs:91)
Unity.Jobs.IJobExtensions+JobStruct`1[T].Execute (T& data, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at <f38c71c86aa64e299d4cea9fb7c715e1>:0)

#15

Hi

Hmm… I think I have fixed this bug in my dev version.
I’ll upload a new beta soon which should fix this.