Too many layers, a maximum of 15 are allowed

In my game players can build their own cities and can make towers as high as they want. During testing, I got the message that there are too many layers. Is this something I can just modify the code to change?

Open your Pathfinder script reference in the editor, then open the Optimizations accordion. Uncheck ASTAR_LEVELGRIDNODE_FEW_LAYERS. That should allow your game to hold up to 255 layers.

After making that change I get this warning:

After pressing apply, I get the following error

PlayerSettings Validation: Requested build target group (26) doesn’t exist; #define symbols for scripting won’t be added.

Callstack is from: static void SetDefineSymbols (Dictionary<BuildTargetGroup, List > symbols)




Meh. Unity has changed some stuff again. I’ll need to update the package.

Are you using the beta version or the regular version?

I’m using the regular version but will use the beta when it has stabilized. I really need the performance improvements for RVO and the layered grid graph.


Okay. You can instead go to your player build settings and change the “Scripting Define Symbols” field. Make sure that ASTAR_LEVELGRIDNODE_FEW_LAYERS is not included in that string. You may have to change this for all platforms you are building for, otherwise it will fail when you build a standalone game.