AstarPath.active.AddWorkItem does not exist in the current context

  • A* version: 4.2.17 (Free Version)
  • Unity version: 6.1.12f1

Hi, I’m working on a city builder game with a road placement system, and I was making a system that could add nodes on the placed road tiles. I used the code from the documentation on the PointGraph.AddNode() function, which specified to call the function in a AstarPath.AddWorkItem callback. When I tried implementing this callback, however, it said it didn’t exist in the current context, even though I’ve added the using Pathfinding namespace to the code. I’m sorry if this is a very stupid question, but I can’t for the life of me figure out how to solve this issue. I’ll put an example of the code in the documentation in a screenshot below just to be safe:

image

Give re-installing the package a try? Also if you’re using any assembly definitions in your project make sure they’re properly set up as well! :smiley:

It could be that you have another class in your project named “AstarPath”?