A* Pathfinding Project

Unable to access Using Pathfinding;


#1

Upon installing the purchased version of A* Pathfinding Project the project is not being added to my folder structure in my visual studio project. I am unable to access using Pathfinding;. I can open the scripts from the folder but none of my project can see the Pathfinding Project scripts to utilize them.

Any advice?

Thanks.


#2

Hi

Are you using assembly definition files by any chance? If so you need to add the A* Pathfinding Project assembly definition file as a dependency in order to use it.


#3

Can you explain what you mean by assembly definition files? I downloaded the project from the site, went into unity and imported package.


#4

Hi

If you don’t know, then you are probably not using them (but see https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html).

So if you write “using Pathfinding;” in some script, what exact error message does Unity give you?


#5

I am not using assembly definition files. Unity is not giving me an error, visual studio cannot find the project. Attached is the error in Visual Studio.

Typically, the import of the scripts into the Unity project are handled when the package is imported; I’ve never run into this issue where the imported package isn’t automatically integrated into the Unity project. Attached is an image of my visual studio hierarchy. The _scripts folder is the container of the code I’ve written, and the other folders are associated with projects I have purchased and installed that have been integrated into my project automatically. Capture Does this make sense?


#6

Hi

I’m not sure what could be causing that.
You could try to delete the .asmdef files in the AstarPathfindingProject folder and rebuild the visual studio project. Unity should have updated your VS project to add the pathfinding scripts as a separate subproject, not sure why that is not happening.


#7

If that does not work am I able to refund the product?


#8

Afish double check that the imported A* package is in /Assets folder in your project, and that it is NOT under Editor folder in any of it’s hierarchies.

It’s not really problem with the package in my opinion, but with the setup of your project. You can also try to delete the ‘Library\ScriptAssemblies’ folder to force rebuild of your assemblies.


#9

Thanks for the reply rast. The package is indeed within the /Assets folder. I would be inclined to agree that it could be an issue with the setup of my project, however I have imported separately purchased packages the exact same way and not encountered this issue in the past.

I also went ahead and created a brand new, empty project and imported the package and ran into the same issue. When I get home I’ll attach a screenshot of the project hierarchy, it could very well be an issue I’m unaware of within the hierarchy but I don’t believe that it is.


#10

What version of Unity do you use? I just imported package to brand new project in 2018.3.1f and it works fine.

Can you check the references of your csproj if AstarPathfindingProject is attached?
reference


#11

I’m at work currently but when I get home I’ll take a look what version I’m running and the references.

Thanks!


#12

I am on Unity version 2017.3.1f1, the site says compatible with anything over 5.2.2 or higher.

Attached is a screenshot showing the project in the /Assets folder, along with a folder called _Scripts with a single script in it called PathTestScript.

I am able to add scripts to gameobjects in my scene, including AstarPathfindingProject scripts as seen here:
image

Upon opening Visual Studio my script has no reference to the AstarPathfindingProject, and I am unable to utilize Using Pathfinding; as a result.


#13

Update! I went ahead and uninstalled visual studio and reinstalled it and that has resolved the issue. I am now able to access Pathfinding. Weird issue, but glad it’s resolved. Thanks for the help.