A Star Pathfinding Integration

To whom it may concern,

I am looking to successfully integrate A Star Pathfinding into Behavior Designer so that I can call tasks within my behavior trees that are related to A Star-like movements. I have successfully downloaded the A Star "integration" into my project, but get a ton of scripting errors immediately upon opening the project in Unity. These errors hinder me from firing up any sort of scene and after much research, as well as much trial and error, I am completely lost as to how to move past these errors.

The example given on the Opsive documentation page is as follows: "For example, if you want to use the A* Pathfinding Project version of the seek task you would add the task located under Actions -> Movement -> A* Pathfinding Project -> Seek.". For me, when I access the "Actions" task within a behavior tree, there is no "Movement" section.

To give a bit of context, my project is in 2D and I am pretty certain that the A Star environment is set up properly since I have been working with A Star on this project for over a year now.

Attached is a screenshot of the different types of errors that are occurring.

How can I move forward from this and properly use A Star within Behavior Designer?

Thank you so much for your time.
- Mike
 

Attachments

  • Screenshot 2024-03-23 at 9.46.47 AM.png
    Screenshot 2024-03-23 at 9.46.47 AM.png
    113.1 KB · Views: 7
Based off of those errors you do not have the base Behavior Designer package imported.
 
To my understanding everything seemed to be installed properly, so just in case I was overlooking something, I wiped everything Behavior Designer-related from my Mac. I then went back to the Unity Asset Store and re-downloaded everything. I am still getting these errors (See attachment) after having re-downloaded the base Behavior Designer plug-in, as well as the movement pack pertaining to A Star Pathfinding. Wondering how to move forward from here.Screenshot 2024-03-24 at 3.18.49 PM.png
 
Do you have another component named BehaviorTree that is not within a namespace? Make sure all of your own scripts are within a namespace because in that case it looks like you have a global BehaviorTree class.
 
Turns out I had an old, unused script that I had created a while ago named "BehaviorTree". Getting rid of this seemed to have cleared things up regarding the newer (12) errors I was just receiving. Thank you Justin! Though now I am back to receiving the same 30 errors that I was receiving yesterday. I deleted and re-installed, then imported the base Behavior Designer and A Star movement pack and am sadly still seeing these 30 compiler errors pop up in my console. At this point I don't see how the base Behavior Designer is imported incorrectly.
 
Can you try importing into a fresh project? Your import order should be:

- A* Pathfinding Project
- Behavior Designer
- Behavior Designer - Movement Pack
- Behavior Designer / A* Pathfinding Project integration

After you import these four packages you should not get any errors at any point. Once you get it working in a fresh project you can then see what is different in your own project.
 
Perhaps I don't understand the "Behavior Designer / A* Pathfinding Project integration" step in the process. To my understanding, based upon the Behavior Designer - Movement Pack documentation, after I complete the first three steps you have listed above, I should be able to start adding tasks onto my behavior tree. In addition to the errors I have been receiving, I have no been seeing these A Star tasks in the Behavior Designer window.
 
The integration step is required since it contains the tasks that link the Movement Pack to the A* Pathfinding Project.

With that said, I looked at your errors again and it looks like you moved the Behavior Designer folder to the plugins directory. Behavior Designer uses assembly definitions so by changing which assembly it is compiled in you are likely missing the correct references. To start with keep everything in the original directory.
 
Ah, that makes a lot of sense. I re-imported the plug-ins and did not move them to any different directories and everything seems to be working well, with no errors. Thank you so much Justin!
 
I guess my next question would then be if there is a similar adjustment between the different movement pack scripts to have them all reference A Star, instead of NavMesh? Or would I have to go into each individual script to change different variable types? I'm assuming it will be the latter. Just a bit confused as the Movement Pack Documentation contains an example stating: "For example, if you want to use the A* Pathfinding Project version of the seek task you would add the task located under Actions -> Movement -> A* Pathfinding Project -> Seek.". I have done this and the Seek task is throwing errors because there are no A Star references being made, only NavMesh references (Our project only uses A Star Pathfinding agents).
 
There are completely separate tasks for A*. If you are getting errors about it referencing the navmesh then you are using the original Movement Pack tasks, and not the A* tasks that you downloaded with the integration.
 
Top