Optimization page with ASTARDEBUG checked has compilation error

Unity 4.6.1 Basic + AStarpathfinding 3.6 + Win 7 64bit

Assets/AstarPathfindingProject/Core/Misc/BinaryHeap.cs(3,0): error CS1025: Single-line comment or end-of-line expected
Assets/AstarPathfindingProject/Generators/RecastGenerator.cs(8,0): error CS1025: Single-line comment or end-of-line expected
Assets/AstarPathfindingProject/Generators/Utilities/Voxels/VoxelClasses.cs(4,0): error CS1025: Single-line comment or end-of-line expected
Assets/AstarPathfindingProject/RVO/RVOController.cs(4,0): error CS1025: Single-line comment or end-of-line expected

I guess you are on Windows, like me. Apparently the code that deals with the defines does not work correctly in all files on this platform, it might be related to line endings. If you look at the lines with errors they will have something like

#define UNITY_GE4#defineUNITY_GE4

In other works, some defines will be repeated, sometimes 3 or 4 times. To solve it just edit so there is only one define in the line, like

#define UNITY_GE4

And it will compile again.

Notice that UNITY_GE4 is just an example, the actual repeated define is different for every file/error.

thank a lot, it is a a workaround. hope that author will fix this in the next update

Ouch, I haven’t seen that before…
I think I should just scrap that whole script and just modify the player build settings instead now that Unity has support for that (it was a huge pain to write that script in the first place, and it is mostly lots of regexes so I am not really surprised that it breaks in some cases).