Can't modify astar scripts

Hi, I just updated to the newest version 4.2. I had 4.1 earlier and one of the files, RecastMeshGatherer, was modified by me for some optimization purposes. Now in 4.2, I can’t access any file outside the Pathfinding namespace anymore inside that class. For example, I have a script called ‘MapSpawner’ from which I call some methods but the compiler says the name ‘MapSpawner’ does not exist in the current context when I try to modify the recast script.

I don’t want to put my own classes in a namespace, they have to remain globally available. I tried moving the file in a directory where all my other scripts are and that solved the problem, but created many more problems with other pathfinding scripts that needed that script to remain in its original position.

Any suggestions?

Hi

This is due to the new assembly definition files (see https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html). You can disable that by deleting all the .asmdef files in the package. That will make those scripts be in the global assembly.

1 Like