AstarData.ClearGraphs
and then immediately calling AstarData.AddGraph
would result in an exception.
- Fixed \reflink{UpdateGraphsNoBlock(GraphUpdateObject,GraphNode,GraphNode,bool)} could return incorrect results if there were already some pending graph updates.
- Fixed grid graph would see 2D triggers as obstacles. Now all 2D colliders marked as triggers will be ignored by the grid graph.
- Fixed a memory leak that could happen after switching scenes. Thanks @nGenius for finding it.
- Fixed RichAI always teleporting to the closest point on the navmesh when the script is enabled even if \reflink{RichAI.canMove} is false.
- Fixed GraphUpdateScene not using the outline from an attached PolygonCollider2D properly.
- Fixed some cases where graph updates with 2D colliders would not use the most up to date physics engine data.
All graph updates are now preceeded by a call to Physics2D.SyncTransforms (in addition to Physics.SyncTransform which was already being called).
- The RaycastModifier now respects graphMasks set on paths. Thanks brettkercher for reporting the bug.
- Fixed linecasts on navmesh/recast graphs could fail when the start of the line was close to a steep slope.
- Fixed linecasts on navmesh/recast graphs would incorrectly return no obstructions if for example used between two floors of a building that were not connected.
- Fixed RichAI trying to traverse an off mesh link twice if the path's endpoint was also the endpoint of an off-mesh link.
- Fixed a missing script in the turnbased example scene causing warnings when opening that scene.
- Fixed warnings would be logged when first importing the package on recent version of Unity due to a change in how Unity imports fbx files.
- Make DynamicGridObstacle call Physics.SyncTransforms to ensure it has the most up to date data for the collider.
- Removed 'Upgrading serialized data ...' message as it was mostly just annoying.
- Fixed GameObject references (like the PointGraph's Root field) would not get serialized properly if the AstarPath component was stored in a prefab.
- Fixed some smaller memory memory leaks in the unity editor.
- Fixed a bug which could cause a SynchronizationLockException to be thrown in some cases when the game was quit in a non-graceful way (e.g. when Unity exits play mode after recompiling scripts).ceebeee
for reporting this. - See release notes for 3.6
Added back local avoidance!!
The new system uses a sampling based algorithm instead of a geometric one.
The API is almost exactly the same so if you used the previous system this will be a drop in replacement.
As for performance, it is roughly the same, maybe slightly worse in high density situations and slightly better
in less dense situations. It can handle several thousand agents on an i7 processor.
Obstacles are not yet supported, but they will be added in a future update.
Binary heap switched out for a 4-ary heap.
This improves pathfinding performances by about 5%.
Optimized scanning of navmesh graphs (not the recast graphs)
Large meshes should be much faster to scan now.
Optimized BBTree (nearest node lookup for navmesh/recast graphs, pro version only)
Nearest node queries on navmesh/recast graphs should be slightly faster now.
Minor updates to the documentation, esp. to the GraphNode class.
Fixed NavmeshGraph not rebuilding BBTree on cached start (causing performance issues on larger graphs).
Includes all changes from the beta releases below
Changes
- Moved JsonFx into the namespace Pathfinding.Serialization.JsonFx to avoid conflicts with users own JsonFx libraries (if they used JsonFx).
Known bugs
- Recast graph does not work when using static batching on any objects included.
\note Dropped Unity 3.3 support.
Known Bugs: The C++ version of Recast does not work on Windows
Changed from FixedUpdate to Update in the Get Started Guide. CharacterController.SimpleMove should not be called more than once per frame,
so this might have lowered performance when using many agents, sorry about this typo.
The List Graph's "raycast" variable is now serialized correctly, so it will be saved.
List graphs do not generate connections from nodes to themselves anymore (yielding slightly faster searches)
List graphs previously calculated cost values for connections which were very low (they should have been 100 times larger),
this can have caused searches which were not very accurate on small scales since the values were rounded to the nearest integer.
Added Pathfinding.Path.recalcStartEndCosts to specify if the start and end nodes connection costs should be recalculated when searching to reflect
small differences between the node's position and the actual used start point. It is on by default but if you change node connection costs you might want to switch it off to get more accurate paths.
Fixed a compile time warning in the free version from referecing obsolete variables in the project.
Added AstarPath.threadTimeoutFrames which specifies how long the pathfinding thread will wait for new work to turn up before aborting (due to request). This variable is not exposed in the inspector yet.
Fixed typo, either there are eight (8) or four (4) max connections per node in a GridGraph, never six (6).
AlternativePath will no longer cause errors when using multithreading!
Added Pathfinding.ConstantPath, a path type which finds all nodes in a specific distance (cost) from a start node.
Added Pathfinding.FloodPath and Pathfinding.FloodPathTracer as an extreamly fast way to generate paths to a single point in for example TD games.
Fixed a bug in MultiTargetPath which could make it extreamly slow to process. It would not use much CPU power, but it could take half a second for it to complete due to excessive yielding
Fixed a bug in FleePath, it now returns the correct path. It had previously sometimes returned the last node searched, but which was not necessarily the best end node (though it was often close)
Using #defines, the pathfinder can now be better profiled (see Optimizations tab -> Profile Astar)
Added example scene Path Types (mainly useful for A* Pro users, so I have only included it for them)
Added many more tooltips in the editor
Fixed a bug which would double the Y coordinate of nodes in grid graphs when loading from saved data (or caching startup)
Graph saving to file will now work better for users of the Free version, I had forgot to include a segment of code for Grid Graphs (sorry about that)
Some other bugfixes
Fixed a critical bug which could render the A* inspector unusable on Windows due to problems with backslashes and forward slashes in paths.
Fixed critical crash bug. When building, a preprocessor-directive had messed up serialization so the game would probably crash from an OutOfMemoryException.
Graph saving to file is now exposed for users of the Free version
Fixed a bug where penalties added using a GraphUpdateObject would be overriden if updatePhysics was turned on in the GraphUpdateObject
Fixed a bug where list graphs could ignore some children nodes, especially common if the hierarchy was deep
Fixed the case where empty messages would spam the log (instead of spamming somewhat meaningful messages) when path logging was set to Only Errors
Changed the NNConstraint used as default when calling NavGraph.GetNearest from NNConstraint.Default to NNConstraint.None, this is now the same as the default for AstarPath.GetNearest.
You can now set the size of the red cubes shown in place of unwalkable nodes (Settings-->Show Unwalkable Nodes-->Size)
Dynamic search of where the EditorAssets folder is, so now you can place it anywhere in the project.
Minor A* inspector enhancements.
Fixed a very rare bug which could, when using multithreading cause the pathfinding thread not to start after it has been terminated due to a long delay
Modifiers can now be enabled or disabled in the editor
Added custom inspector for the Simple Smooth Modifier. Hopefully it will now be easier to use (or at least get the hang on which fields you should change).
Added AIFollow.canSearch to disable or enable searching for paths due to popular request.
Added AIFollow.canMove to disable or enable moving due to popular request.
Changed behaviour of AIFollow.Stop, it will now set AIFollow.ccanSearch and AIFollow.ccanMove to false thus making it completely stop and stop searching for paths.
Removed Path.customData since it is a much better solution to create a new path class which inherits from Path.
Seeker.StartPath is now implemented with overloads instead of optional parameters to simplify usage for Javascript users
Added Curved Nonuniform spline as a smoothing option for the Simple Smooth modifier.
Added Pathfinding.WillBlockPath as function for checking if a GraphUpdateObject would block pathfinding between two nodes (useful in TD games).
Unity References (GameObject's, Transforms and similar) are now serialized in another way, hopefully this will make it more stable as people have been having problems with the previous one, especially on the iPhone.
Added shortcuts to specific types of graphs, AstarData.navmesh, AstarData.gridGraph, AstarData.listGraph
Known Bugs: The C++ version of Recast does not work on Windows
Grid Graphs can now be scaled to allow non-square nodes, good for isometric games.
Added more options for custom links. For example individual nodes or connections can be either enabled or disabled. And penalty can be added to individual nodes
Placed the Scan keyboard shortcut code in a different place, hopefully it will work more often now
Disabled GUILayout in the AstarPath script for a possible small speed boost
Some debug variables (such as AstarPath.PathsCompleted) are now only updated if the ProfileAstar define is enabled
DynamicGridObstacle will now update nodes correctly when the object is destroyed
Unwalkable nodes no longer shows when Show Graphs is not toggled
Removed Path.multithreaded since it was not used
Removed Path.preCallback since it was obsolate
Added Pathfinding.XPath as a more customizable path
Added example of how to use MultiTargetPaths to the documentation as it was seriously lacking info on that area
The viewing mesh scaling for recast graphs is now correct also for the C# version
The StartEndModifier now changes the path length to 2 for correct applying if a path length of 1 was passed.
The progressbar is now removed even if an exception was thrown during scanning
Two new example scenes have been added, one for list graphs which includes sample links, and another one for recast graphs
Reverted back to manually setting the dark skin option, since it didn't work in all cases, however if a dark skin is detected, the user will be asked if he/she wants to enable the dark skin
Added gizmos for the AIFollow script which shows the current waypoint and a circle around it illustrating the distance required for it to be considered "reached".
The C# version of Recast does now use Character Radius instead of Erosion Radius (world units instead of voxels)
Fixed an IndexOutOfRange exception which could occur when saving a graph with no nodes to file
Known Bugs: The C++ version of Recast does not work on Windows
Added support for a C++ version of Recast which means faster scanning times and more features (though almost no are available at the moment since I haven't added support for them yet).
Removed the overload AstarData.AddGraph (string type, NavGraph graph) since it was obsolete. AstarData.AddGraph (Pathfinding.NavGraph) should be used now.
Fixed a few bugs in the FunnelModifier which could cause it to return invalid paths
A reference image can now be generated for the Use Texture option for Grid Graphs
Fixed an editor bug with graphs which had no editors
Graphs with no editors now show up in the Add New Graph list to show that they have been found, but they cannot be used
Deleted the \a graphIndex parameter in the Pathfinding.NavGraph.Scan function. If you need to use it in your graph's Scan function, get it using Pathfinding.AstarData.GetGraphIndex
Javascript support! At last you can use Js code with the A* Pathfinding Project! Go to A* Inspector-->Settings-->Editor-->Enable Js Support to enable it
The Dark Skin is now automatically used if the rest of Unity uses the dark skin(hopefully)
Fixed a bug which could cause Unity to crash when using multithreading and creating a new AstarPath object during runtime
\link Pathfinding.PointGraph List Graphs \endlink now support UpdateGraphs. This means that they for example can be used with the DynamicObstacle script.
List Graphs can now gather nodes based on GameObject tags instead of all nodes as childs of a specific GameObject.
List Graphs can now search recursively for childs to the 'root' GameObject instead of just searching through the top-level children.
Added custom area colors which can be edited in the inspector (A* inspector --> Settings --> Color Settings --> Custom Area Colors)
Fixed a NullReference bug which could occur when loading a Unity Reference with the AstarSerializer.
Fixed some bugs with the FleePath and RandomPath which could cause the StartEndModifier to assign the wrong endpoint to the path.
Documentation is now more clear on what is A* Pathfinding Project Pro only features.
Pathfinding.NNConstraint now has a variable to constrain which graphs to search (A* Pro only).\n This is also available for Pathfinding.GraphUpdateObject which now have a field for an NNConstraint where it can constrain which graphs to update.
StartPath calls on the Seeker can now take a parameter specifying which graphs to search for close nodes on (A* Pro only)
Added the delegate AstarPath.OnAwakeSettings which is called as the first thing in the Awake function, can be used to set up settings.
Pathfinding.UserConnection.doOverrideCost is now serialized correctly. This represents the toggle to the right of the "Cost" field when editing a link.
Fixed some bugs with the RecastGraph when spans were partially out-of-bounds, this could generate seemingly random holes in the mesh
Added a Dark Skin for Unity Pro users (though it is available to Unity Free users too, even though it doesn't look very good). It can be enabled through A* Inspector --> Settings --> Editor Settings --> Use Dark Skin
Added option to include or not include out of bounds voxels (Y axis below the graph only) for Recast graphs.
Fixed a NullReferenceException caused by Voxelize.cs which could surface if there were MeshFilters with no Renderers on GameObjects (Only Pro version affected)
Textures can now be used to add penalty, height or change walkability of a Grid Graph (A* Pro only)
Slope can now be used to add penalty to nodes
Height (Y position) can now be usd to add penalty to nodes
Prioritized graphs can be used to enable prioritizing some graphs before others when they are overlapping
Several bug fixes
Included a new DynamicGridObstacle.cs script which can be attached to any obstacle with a collider and it will update grids around it to account for changed position
Fixed Unity 3.3 compability
Rewrote the system from scratch
Funnel modifier
Easier to extend the system