- Home /
Question by
Excuze · Apr 01, 2021 at 10:45 PM ·
2daipathfinding
A* Pathfinding Occasionally Doing A Ridiculous Number of Checks
Hello!
I recently followed a tutorial by CodeMonkey (https://www.youtube.com/watch?v=1bO1FdEThnU&ab_channel=CodeMonkey) to create an A* pathfinding script using ECS.
I've modified it some to fit my use case since then, and have started having a weird problem. Most of the time it works perfectly fine and pathfinds correctly, but sometimes it'll freeze up and debug logging has told me it's checking >10k nodes. For context, it normally checks 10-50 in that same distance.
My current code for the Pathfinding class is here: https://pastebin.com/2bUGMp6Y
Let me know if there's anything else I can send to help you help me :P
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613031637im_/https://answers.unity.com/themes/thub/images/avi.jpg)