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.
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.
Can you explain what you mean by assembly definition files? I downloaded the project from the site, went into unity and imported package.
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?
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.
Does this make sense?
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.
If that does not work am I able to refund the product?
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.
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.
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?
I’m at work currently but when I get home I’ll take a look what version I’m running and the references.
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:
Upon opening Visual Studio my script has no reference to the AstarPathfindingProject, and I am unable to utilize Using Pathfinding; as a result.
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.
I am having the same problem, however reinstalling visual studio didn’t fix it for me. I’m on Unity 2019.3.12f1 and I found that deleting the .asmdef files (like aron_granberg said earlier) would let me access Pathfinding, but would cause errors that would make it where I can’t play the game. I tried rebuilding afterwords but that didn’t fix the issue (granted I might have done it wrong).
Any suggestions on how to fix this? I am completely stumped.
2019.3.12 seeems to have some bug in it. Several other users have also reported this. Try using Unity 2019.3.10 or 2019.3.13 instead.
I didn’t know about the bug. I just updated and its working. Thank you for the help
Hey, I ran into this issue and deleting my .asmdef totally borked my project too. Any suggestions on how to fix this?
Update: I tried using Clean/Build/Rebuild project options from within Visual Studio to no avail. Then I tried re-importing the .asmdef from the A* package and now the errors are gone but I can’t access anything while
using Pathfinding; surely I’m missing something.
Update2: Forgot to include that I’m using Unity 2020.1.11f1
Yo, what’s up. I have found my solution. First of all, you DONT’T want to open your visual studio by selecting script in Unity packages(file explorer). You must go to your File explorer and find your game folder and find “yourprojectname”.sln (Visual Studio Solution) and open it.
If there is no file like that go to your opened unity project, On the left top corner click Edit, go to Preferences and go to External Tools then change External Script Editor to Visual Studio and it should generate all the files you need. After that go to your project folder and double click yourprojectname".sln (Visual Studio Solution) problem gone.
If there is go to your opened unity project, On the left top corner click Edit, go to Preferences and go to External Tools then change External Script Editor to Visual Studio chack all Generate .csproj files for:… and click Regenerate project files.
If that didn’t solve the issue, delete all .scproj files
and click Regenerate project files in External Script Editor
Had the same issue today after importing the asset. I tried most of the suggestions here without success. In the end the simple solution was to go into Edit/Preferences…/External Tools (make sure your External Script Editor is set to Visual Studio) and click on “Regenerate project files”, then I had to click into VS IDE once and it loaded everything and “using Pathfinding” worked.
I had a similar problem and after several hours of trying and google searching I moved the modified (and inherited) topdownengine source file from the assets / topdownengine / … folder to the assets / scripts folder and everything started working.