Optimize the A* Pathfinding

From the start, the system is really fast, however since there are such a lot of settings for the system it is not as fast as it could be.
Even a small thing like removing an IF statement can make noticable difference since there are some IF’s which might get called several tousand times during a single frame.

In the AstarPath.cs script and the AstarClass.cs script I have put comments all starting with @Performance where large optimizations can be done with instructions on how to increase the performance by hard coding certain settings.
This requires a basic knowledge of scripting, even if you only know JavaScript (unityScript) you should be able to follow the instructions.

Example:

switch (formula) {

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>