Can't find defines.csv

Just upgraded to Unity 5.5 and Astar 3.8.7 Pro and am now getting the following error:

The reason it can’t find it is because it isn’t there. defines is directly under the AstarPathfindingProject folder which is where it is placed when it imports.

Could not find file ‘… Project… /Assets\Plugins\Editor\AStarPathfindingProject/defines.csv’
UnityEngine.Debug:LogError(Object)
Pathfinding.OptimizationHandler:FindDefines() (at Assets/Third Party Assets/AstarPathfindingProject/Editor/OptimizationHandler.cs:110)
AstarPathEditor:DrawOptimizationSettings() (at Assets/Third Party Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:576)
AstarPathEditor:DrawMainArea() (at Assets/Third Party Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:550)
AstarPathEditor:OnInspectorGUI() (at Assets/Third Party Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:303)
UnityEditor.DockArea:OnGUI()

Hi

It looks like you have moved the folders around a bit. Possibly this has caused some files be be imported to the wrong locations when you upgraded the package. Try to delete all AstarPathfindingProject folders and import the package again.

Thanks for the quick reply. Yes, it is true I moved AstarPathfindingProject and its children under my own Assets/ThirdPartyAssets folder where I have most of the rest of my third party content. That is where the defines file is located.

The only other content (VSCode.cs) is under Assets/Plugins/Editor/AStarPathfindingProject. I did add the AStarPathfindingProject folder to separate VSCode.cs from other content in Plugins so I know it is one of yours.

With that said, the defines file is imported directly under AstarpathfindingProject when I import it into an empty project. It is not placed in Assets/Plugins/Editor/ which is where the error seems to be indicating it should be.

One last observation: this error occurred after I pushed the "Generate Cache’ button to get rid of the old data warning. I don’t currently use the cache, but regenerating it got rid of the warning.

Hope this gives you enough.

Huh, that VSCode file shouldn’t have been included in the package… I wonder why my build script decided to include it.
It is only used as a plugin to be able to use the VSCode text editor for development. You can delete it safely (as well as the folder it is in).

The script that tries to find the defines.csv file looks for folders named AstarPathfindingProject with the assumption that there should only be a single one in the project.

That is it then. My self created AStarPathfindingProject under Plugins/Editor was found first. I’ll delete the whole Assets/Plugins path for your content which should resolve the issue. Btw, how do you actually enable the #defines you want - just add to the defines.csv file? eg. #define ASTAR_NO_ZIP

Ah, I see. Your Optimization editor adds toggles… Wasn’t seeing that before as it wasn’t finding the defines file …