changelog.cs 168 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846
  1. /// <summary>
  2. /// \page changelog Changelog
  3. /// \order{-10}
  4. ///
  5. /// - 4.2.8 (2019-04-29)
  6. /// - Made it possible for nearest node queries on point graphs to find the closst connection instead of just the closest node.
  7. /// This will make it easier to use graphs when you have many long connections.
  8. /// See <see cref="Pathfinding.PointGraph.nearestNodeDistanceMode"/>.
  9. /// - Improved the Seeker->StartEndModifier's Connection snapping mode. Now it will behave better if the path only moves along a single connection in the graph.
  10. /// - Fixed a crash when deploying for Nintendo Switch due to a Unity bug when setting thread names. Thanks ToastyStoemp for reporting this.
  11. /// - Fixed some compiler warnings in the ObjImporter class that would show up on some platforms.
  12. /// - Fixed GridGraph.CalculateConnectionsForCellAndNeighbours would throw an exception when called with the coordinates for a node on the border of the grid. Thanks davidpare for reporting this.
  13. ///
  14. /// - 4.2.7 (2019-04-05)
  15. /// - Significantly improved graph rendering performance for recast graphs when using a very large number of small tiles.
  16. /// - Fixed GridGraph.CountNodes throwing an exception when the graph is not scanned. Now it will return 0.
  17. ///
  18. /// - 4.2.6 (2019-03-23)
  19. /// - Fixed AIPath.reachedDestination and RichAI.reachedDestination only worked when the y coordinate of the agent was close to zero... which it of course was in all my tests.
  20. /// Sorry about this silly bug and the headache it may have caused.
  21. /// - Fixed loading a serialized navmesh graph when the source mesh no longer existed would cause the graph to be offset if a navmesh cut was later used to cut it.
  22. ///
  23. /// - 4.2.5 (2019-02-14)
  24. /// - Added a new documentation page for how to create and configure graphs during runtime. runtime-graphs (view in online documentation for working links).
  25. /// - Added a new documentation page about editing point graph connections manually. editing-graphs (view in online documentation for working links).
  26. /// - Fixed exceptions could be thrown if the project contains some assemblies that can for some reason not be read.
  27. /// - Fixed the visualization for unwalkable nodes (red cubes) sometimes disappearing in newer versions of Unity (2018.2+ I think) due to a change in how Time.renderedFrameCount works.
  28. /// Thanks Kevin Jenkins for reporting this.
  29. /// - Fixed applying optimizations (under the Optimizations tab) could cause several error messages to be logged about unsupported platforms in Unity 2018.3 or newer. Thanks NoxMortem for reporting the issue.
  30. /// - Fixed AIPath throwing an exception if it was given a valid path that contained no nodes at all.
  31. /// - Made Path.GetTagPenalty public instead of internal.
  32. /// - Added <see cref="Pathfinding.ABPath.FakePath"/>.
  33. /// - Worked around a null reference exception bug when using IL2CPP and deploying for iPhone.
  34. /// This is caused by a bug in the IL2CPP compiler.
  35. /// - Fixed custom graph types could not be used if they were in another assembly. Thanks juskelis for reporting this and founderio for finding a fix.
  36. ///
  37. /// - 4.2.4 (2018-12-03)
  38. /// - Added an option for which dimension of the hexagon to adjust in the grid graph editor when using the hexagonal mode.
  39. /// This significantly helps with making a hexagonal graph line up with your other game elements as previously you might have had to manually calculate some complicated conversion factors in order to do this.
  40. /// - Fixed loading navmesh graphs from a file could be extremely slow if the graph had been saved with the source mesh field set to a mesh with an empty name and your project had a lot of things in its Resources folder.
  41. /// - Fixed a massive performance regression when using RVO together with IL2CPP and .net 4.6 due to changes in how the .net framework handles locking internally.
  42. /// - Made GraphNode.Destroy public again (it was made internal in 4.2) because without that, it is not possible to make custom graph types.
  43. /// - Made Path.PipelineState, Path.duration and Path.pathID public again (they were made internal in 4.2) because those properties are actually useful even for non-internal use.
  44. /// This also fixes some incompatibility issues with the Node Canvas integration package. Thanks jsaracev and Grofit for reporting this.
  45. ///
  46. /// - 4.2.3 (2018-11-07)
  47. /// - Fixed some compiler warnings in the free version on newer versions of Unity.
  48. /// - Fixed a bug which caused point graphs to interpret the nearest node distance limit as being 1/1000th the actual value in the free version of the package and in the pro version when not using the 'optimize for sparse graph' option.
  49. /// This bug caused the point graph example scene to not work in the free version of the package.
  50. ///
  51. /// - 4.2.2 (2018-10-25)
  52. /// - Fixed upgrading from an earlier 4.x version to 4.2 could cause compiler errors in some newer versions of Unity because the UnityPackage doesn't import the new directory structure correctly.
  53. ///
  54. /// - 4.2.1 (2018-10-23)
  55. /// - Fixed a bug which caused scanning navmesh graphs to throw an exception when using the free version of the package. Thanks Hunted for reporting the bug.
  56. ///
  57. /// - 4.2 (2018-10-17)
  58. /// - 4.1.17 through 4.1.26 were beta versions, all their changelogs have been merged into this one.
  59. /// - Upgrade notes
  60. /// - This release contains some breaking changes (primarily the pivot point change for characters that you can read about below).
  61. /// This will affect very few users, but I still recommend that you take a backup of your project before upgrading.
  62. /// - Since 4.1.23 the base of the character when using AIPath/RichAI is always at the pivot point of the Transform.
  63. /// This reduces code complexity and improves performance. Most users would already have had configured their characters that way, but in
  64. /// rare cases you may have to adjust your characters a bit (mostly just move them up or down a bit).
  65. /// - When changing some low level fields that can affect the connectivity of the graph such as <see cref="Pathfinding.MeshNode.connections"/> you must now call <see cref="Pathfinding.GraphNode.SetConnectivityDirty()"/>.
  66. /// The documentation for all the relevant fields mention this. Currently it only applies to the connection fields on the MeshNode, PointNode and GridNodeBase classes.
  67. /// All high level methods that modify the connectivity do this automatically. Most likely you do not have to change your code.
  68. /// - When updating the graph using a work item, it is no longer necessary to call the QueueFloodFill or FloodFill methods. Due to the hierarchical graph update mentioned below, this is all handled transparently behind the scenes.
  69. /// You should remove any calls to those deprecated methods as they will (for backwards compatibility reasons) force a full recalculation of the connected components which is much slower than what is likely necessary.
  70. /// - Improvements
  71. /// - Converted all comments to XML comments.
  72. /// This will drastically improve intellisense for most users as Doxygen style comments are not supported by that many editors.
  73. /// As the whole codebase has been converted using a script, there is a potential for errors in the translation.
  74. /// Please let me know if you find anything which looks odd or where the intellisense info could be improved.
  75. /// - Improved recast graph scanning speed by up to 60% in the unity editor on Mono2x.
  76. /// Surisingly this optimization doesn't seem to matter much for other compiler backends.
  77. /// This may cause minor changes to your navmesh. If this change causes bad navmeshes to be generated or if it reduces performance, please start a thread in the forum.
  78. /// - The RVOController and AIPath/RichAI scripts now take the scale of the object into account when using their respective height and radius fields.
  79. /// If you have an existing character with a non-unit scale the height and radius fields will automatically be updated to compensate for this scale.
  80. /// However if you are scaling characters during runtime, this may change their behaviour.
  81. /// - Added a new <see cref="Pathfinding.GraphMask"/> struct to represent a set of graphs.
  82. /// Previously graph masks have been represented using pure integers (e.g. in <see cref="Pathfinding.Seeker.graphMask"/> and <see cref="Pathfinding.NNConstraint.graphMask)"/>.
  83. /// The new struct contains some nice helper methods like <see cref="Pathfinding.GraphMask.FromGraphName"/> which has been requested by many users.
  84. /// - Added a new documentation page describing the inspector: inspector (view in online documentation for working links).
  85. /// - Added a new documentation page with an overview of the different included movement scripts: movementscripts (view in online documentation for working links).
  86. /// - Added a new property on all movement scripts called <see cref="Pathfinding.IAstarAI.reachedDestination"/>.
  87. /// The existing <see cref="Pathfinding.IAstarAI.reachedEndOfPath"/> property has some quirks, which are very reasonable when considering how everything works,
  88. /// but are not very intuitive for new users and it can easily lead to quite brittle code. This new property will work as expected for most use cases.
  89. /// - Added a height and radius for the AIPath and RichAI movement scripts.
  90. /// This in turn deprecates the old <see cref="Pathfinding.AIBase.centerOffset"/> field as it is now implicitly height/2.
  91. /// If an RVOController is attached to the same GameObject, its height and radius will be driven by the movement script's values.
  92. /// The script will try to autodetect reasonable height and radius values from other attached components upon upgrading.
  93. /// - Improved look of all movement script inspectors by grouping the fields into different sections. Also added some validation to prevent invalid field values.
  94. /// - Added <see cref="Pathfinding.AstarData.GetNodes"/>.
  95. /// - Optimized graph rendering a bit. In particular if multiple scene views/in game cameras are used.
  96. /// - The default graph rendering mode is now 'Solid Color' instead of 'Areas'. This new mode will render the graphs with a single color as the name implies.
  97. /// The Area coloring mode has turned out to sometimes be confusing for new users and it is not useful that often anyway.
  98. /// - Improved performance of small graph updates on large graphs by a very large amount.
  99. /// Previously when making a small update to a large graph, updating the connected components of the graph using a flood fill has been the thing which took the longest time by far.
  100. /// Using a new internal hierarchical graph it is now possible to update large graphs much faster. For example making a small update to a 1024*1024 grid graph is on the order of 30 times faster and is now perfectly reasonable to do in real time (slightly depending on how the graph looks and its settings).
  101. /// The cost of the flood fill was previously offloaded to a separate thread, so it would not always be noticed in the Unity profiler, but it was there and <a href="http://forum.arongranberg.com/t/updategraphs-lag-spikes">could affect the performance of the game in strange ways</a>.
  102. /// The performance of scanning a graph or updating the whole graph remains roughly the same.
  103. /// For more information about how this works, see <see cref="Pathfinding.HierarchicalGraph"/>.
  104. /// - Removed small allocation that was previously done for each calculated path on grid graphs.
  105. /// - Pathfinding threads now show up in the Unity Profiler in the Timeline view when using a recent Unity version (2017.3 or higher).
  106. /// - Scanning layered grid graphs is now approximately 2.2x as fast.
  107. /// - Updating layered grid graphs is now approximately 1.5x as fast.
  108. /// - Scanning and updating layered grid graphs now allocates a lot less memory.
  109. /// - Added assembly definition (.asmdef) files to the package and restructured things a bit.
  110. /// This will help cut down on the compilation times in your project. See https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html for more info.
  111. /// - Improved performance of scanning and updating recast graphs, in particular with very large tiles.
  112. /// - Improved performance of get nearest queries on point graphs when not using <see cref="Pathfinding.PointGraph.optimizeForSparseGraph"/>.
  113. /// - Reduced memory usage of local avoidance slightly.
  114. /// - All navmesh/recast graphs now support navmesh cutting out of the box and the TileHandlerHelper component is no longer necessary.
  115. /// If you have a TileHandlerHelper component in your scene you can safely delete it after upgrading.
  116. /// - AIPath/RichAI now has an option for disabling rotation completely. This was possible before as well, but the options you had to set were not entirely intuitive.
  117. /// The inspector has been restructured a bit to improve the ease of use.
  118. /// - Changes
  119. /// - Removed non-generic version of PathPool which has been deprecated since early 2016.
  120. /// - Removed various methods in the AstarMath and Polygon classes which have been deprecated since early 2016.
  121. /// - Removed a few other things that have been deprecated since early 2016.
  122. /// - Removed AstarPath.ScanLoop which has been deprecated since 2015.
  123. /// - Removed IntRect.Rotate and IntRect.Offset because they were not used by any part of the package.
  124. /// - Removed the mostly internal method <see cref="Pathfinding.GraphCollision.Raycast"/> because it was not used by any code in the package.
  125. /// - Changed signature and behavior slightly of the mostly internal method <see cref="Pathfinding.GraphCollision.CheckHeightAll"/>.
  126. /// - Replaced <see cref="Pathfinding.LayerGridGraph.SampleCell"/> with the new method <see cref="Pathfinding.LayerGridGraph.SampleHeights"/> which does essentially the same thing, but in a more efficient way.
  127. /// - The rotationIn2D option for the built-in movement scripts has been renamed to <see cref="Pathfinding.AIBase.orientation"/> and is now an enum.
  128. /// - Fixes
  129. /// - Replaced usage of the WWW class with the newer UnityWebRequest in the update checker to avoid a deprecation compiler warning in newer versions of Unity.
  130. /// - Fixed a bug in the A* inspector that could cause the inspector to log errors and look weird in Unity 2018.3b5 and up. Thanks Aisit for reporting the bug.
  131. /// - Fixed a rare race condition that could cause exceptions in various parts of the code due to the StackPool class not being thread safe. Thanks nindim for reporting the issue.
  132. /// - Fixed applying optimizations (under the Optimizations tab) could cause several error messages to be logged about unsupported platforms in Unity 2018.2 or newer and in 2017.4.
  133. /// - Fixed trying to set a tag on a node to a value outside the valid range (0...32) could silently cause very weird behavior as other fields were affected by that.
  134. /// - Fixed minor allocation when calling <see cref="AstarPath.GetNearest"/> without an NNConstraint.
  135. /// - Fixed a bug introduced in 4.1.22 which could cause a null reference exception to sometimes be thrown when visualizing graphs in the scene view.
  136. /// - Fixed <see cref="Pathfinding.Path.IsDone"/> could due to a race condition return true a tiny amount of time before the path was actually calculated.
  137. /// - Fixed a bug introduced in 4.1.18 which caused various rotation settings to be hidden in the inspector for the RichAI component.
  138. /// - Fixed removing a movement script from the same component as an RVOController during runtime would not cause the RVOController to stop using the (now destroyed) movement script's position for local avoidance calculations.
  139. /// - Fixed the ObjectPlacer example script which is used in some example scenes would not always update the graph properly after destroying objects.
  140. /// In Unity object destruction is delayed until after the Update loop, but the script did not wait to update the graph until after the object had actually been destroyed. Thanks djzombie for reporting this.
  141. /// - Fixed recalculating a part of a recast graph using a graph update object would not expand the bounding box with the character radius to make sure that all tiles that could be affected by something inside the box were updated.
  142. /// - Worked around occational crashes when using RVO with the IL2CPP backend due to a bug in IL2CPP.
  143. /// - Fixed scanning a recast graph could throw an exception if there was a RecastMeshObj component attached to a GameObject with a MeshFilter that had a null/missing mesh. Thanks ccm for finding the bug.
  144. /// - Fixed FloodPath throwing an exception when starting on a node that isn't connected to any other node. Thanks BulwarkStudios for finding the bug.
  145. /// - Fixed applying optimizations (under the Optimizations tab) could cause several error messages to be logged about unsupported platforms in Unity 2018.1 or newer. Thanks NFMonster for reporting the issue.
  146. /// - Rotation speed and acceleration are now decoupled for AIPath and RichAI. Previously the acceleration limited how quickly the agents could rotate due to how the math for <a href="https://en.wikipedia.org/wiki/Centripetal_force">centripetal acceleration</a> works out.
  147. /// This was originally added in 4.1.11, but due to a typo the change was disabled. Now it is properly working.
  148. /// - Fixed GraphModifier.OnGraphsPostUpdate being called multiple times during a single update if multiple tiles were updated due to navmesh cutting.
  149. /// This can significantly improve performance if you are using many off-mesh links or you are using the RVONavmesh component.
  150. /// - Fixed an edge case bug which could cause get nearest node queries on a newly scanned point graph to return older destroyed nodes.
  151. /// - Fixed work items throwing exceptions could cause some internal data to get into an invalid state.
  152. /// - Fixed tree colliders would not be rasterized correctly when using the recast graph and the tree prefabs had been scaled.
  153. /// - Fixed not finding graph types and graph editors from other assemblies than the one which contains the pathfinding system (important when using asmdef files).
  154. /// - Fixed <see cref="AstarPath.FlushWorkItems"/> always pausing the pathfinding threads even if no work items were queued.
  155. /// - Fixed loading navmesh graphs (and potentially in rare cases: recast graphs) from the cache or from a file could result in bad graph data which confused the funnel modifier which would create very zig-zaggy paths.
  156. /// If you have been experiencing this then just re-save your graphs/regenerate the cache after you have updated and then it should work as it should. Thanks Igor Aherne for reporting this.
  157. ///
  158. /// - 4.1.16 (2018-04-26)
  159. /// - Fixed PointNode.ContainsConnection could throw an exception if the node didn't have any connections.
  160. /// - Fixed AILerp's started out with a destination set to (0,0,0) instead of not having a destination set.
  161. /// So if you did not set a destination for it, it would try to move to the world origin.
  162. ///
  163. /// - 4.1.15 (2018-04-06)
  164. /// - Fixed RichAI.desiredVelocity always being zero. Thanks sukrit1234 for finding the bug.
  165. /// - Added some video examples to <see cref="Pathfinding.AIPath.pickNextWaypointDist"/>.
  166. /// - Fixed a bug introduced in 4.1.14 which caused scanning recast graphs in the Unity editor to fail with an error sometimes.
  167. /// - Fixed the position returned from querying the closest point on the graph to a point (AstarPath.GetNearest) on layered grid graphs would always be the node center, not the closest point on the node's surface. Thanks Kevin_Jenkins for reporting this.
  168. /// This caused among other things the ClosestOnNode option for the Seeker's StartEndModifier to be identical to the SnapToNode option.
  169. /// - Fixed RVOController.velocity being zero when the game was paused (Time.timeScale = 0).
  170. ///
  171. /// - 4.1.14 (2018-03-06)
  172. /// - Fixed Pathfinding.GridNode.ClosestPointOnNode being completely broken. Thanks Ivan for reporting this.
  173. /// This was used internally in some cases when pathfinding on grid graphs. So this fixes a few cases of strange pathfinding results too.
  174. /// - It is now possible to use pathfinding from editor scripts. See editor-mode (view in online documentation for working links).
  175. ///
  176. /// - 4.1.13 (2018-03-06)
  177. /// - Fixed LayerGridGraph.GetNode not performing out of bounds checks.
  178. /// - Exposed a public method <see cref="Pathfinding.PointGraph.ConnectNodes"/> which can be useful if you are creating a graph from scratch using e.g PointGraph.AddNode.
  179. /// - Improved the multiple-agent-types (view in online documentation for working links) tutorial.
  180. /// - Improved the custom_movement_script (view in online documentation for working links) tutorial, among other things it can now also be followed if you are creating a 2D game.
  181. /// The movement script that you write has also been improved.
  182. /// - Improved how the RichAI movement script keeps track of the node it is on. It should now be more stable in some cases, especially when the ground's y-coordinate lines up badly with the y-coordinate of the navmesh.
  183. /// - Added an <see cref="Pathfinding.AIPath.constrainInsideGraph"/> to AIPath for constraining the agent to be inside the traversable surface of the graph at all times.
  184. /// I think it should work everywhere without any issues, but please post in the forum if anything seems to break.
  185. /// - Fixed the proper fonts were not imported in the documentation html, so for many browsers it fell back to some other less pretty font.
  186. ///
  187. /// - 4.1.12 (2018-02-27)
  188. /// - Fixed right clicking on array elements in the Unity inspector would bring up the 'Show in online documentation' context menu instead of the Unity built-in context menu (which is very useful).
  189. /// - Navmesh assets used in the navmesh graph no longer have to be at the root of the Resources folder, they can be in any subfolder to the Resources folder.
  190. ///
  191. /// - 4.1.11 (2018-02-22)
  192. /// - You can now set which graphs an agent should use directly on the Seeker component instead of having to do it through code.
  193. /// [Open online documentation to see images]
  194. /// - Added tutorial for how to deal with agents of different sizes: multiple-agent-types (view in online documentation for working links).
  195. /// - Fixed scanning recast graphs could in rare cases throw an exception due to a multithreading race condition. Thanks emrys90 for reporting the bug.
  196. /// - Fixed a regression in 4.0.6 which caused position based penalty to stop working for layered grid graphs. Thanks DougW for reporting the bug.
  197. /// - Rotation speed and acceleration are now decoupled for AIPath and RichAI. Previously the acceleration limited how quickly the agents could rotate due to how the math for <a href="https://en.wikipedia.org/wiki/Centripetal_force">centripetal acceleration</a> works out.
  198. /// - Acceleration can now be set to a custom value on the AIPath class. It defaults to a 'Default' mode which calculates an acceleration such that the agent reaches its top speed in about 0.4 seconds. This is the same behaviour that was hardcoded in earlier versions.
  199. /// - Fixed a bug in <see cref="Pathfinding.GraphUtilities.GetContours"/> for grid graphs when the nodes parameter was explicitly passed as non null that could cause some contours not to be generated. Thanks andrewBeers for reporting the bug.
  200. /// - Improved documentation for <see cref="Pathfinding.StartEndModifier.Exactness"/>.
  201. ///
  202. /// - 4.1.10 (2018-01-21)
  203. /// - 4.1.0 through 4.1.9 were beta versions, all their changelogs have been merged into this one.
  204. /// - Upgrade notes
  205. /// - Fixed the AIPath script with rotationIn2D would rotate so that the Z axis pointed in the -Z direction instead of as is common for Unity 2D objects: to point in the +Z direction.
  206. /// - ALL classes are now inside the Pathfinding namespace to reduce potential naming collisions with other packages.
  207. /// Make sure you have "using Pathfinding;" at the top of your scripts.
  208. /// Previously most scripts have been inside the Pathfinding namespace, but not all of them.
  209. /// The exception is the AstarPath script to avoid breaking too much existing code (and it has a very distinctive name so name collisions are not likely).
  210. /// - Since the API for several movement scripts have been unified (see below), many members of the movement scripts have been deprecated.
  211. /// Your code should continue to work exactly as before (except bugs of course, but if some other behaviour is broken, please start a thread in the forum) but you may get deprecation warnings.
  212. /// In most cases the changes should be very easy to make as the visible changes mostly consist of renames.
  213. /// - A method called <see cref="Pathfinding.IAstarAI.SetPath"/> has been added to all movement scripts. This replaces some hacks you could achieve by calling the OnPathComplete method on the movement scripts
  214. /// from other scripts. If you have been doing that you should now call SetPath instead.
  215. /// - Paths calculated with a heuristic scale greater than 1 (the default is 1) might be slightly less optimal compared to before.
  216. /// See below for more information.
  217. /// - The StartEndModifier's raycasting options are now only used if the 'Original' snapping option is used as that's the only one it makes sense for.
  218. /// - The RaycastModifier has changed a bit, so your paths might look slightly different, however in all but very rare cases it should be at least as good as in previous versions.
  219. /// - Linecast methods will now assign the <see cref="Pathfinding.GraphHitInfo.node"/> field with the last node that was traversed in case no obstacle was hit, previously it was always null.
  220. /// - Multithreading is now enabled by default (1 thread). This may affect you if you have been adding the AstarPath component during runtime using a script, though the change is most likely positive.
  221. /// - The DynamicGridObstacle component will now properly update the graph when the object is deactivated since the object just disappeared and shouldn't block the graph anymore.
  222. /// Previously it only did this if the object was destroyed, not if it was deactivated.
  223. /// - If you have written a custom graph type you may have to change the access modifier on some methods.
  224. /// For example the ScanInternal method has been changed from being public to being protected.
  225. /// - Some internal methods on graphs have been hidden. They should never have been used by user code
  226. /// but in case you have done that anyway you will have to access them using the IGraphInternals or IUpdatableGraph interface now.
  227. /// - Removed some compatibility code for Seekers for when upgrading from version 3.6.7 and earlier (released about 2 years ago).
  228. /// If you are upgrading from a version that old then the 'Valid Tags' field on the Seeker component may get reset to the default value.
  229. /// If you did not use that field then you will not have to do anything.
  230. /// - AIPath now rotates towards actual movement direction when RVO is used.
  231. /// - Improvements
  232. /// - Improved pathfinding performance by around 8% for grid graphs, possibly more for other graph types.
  233. /// This involved removing a special case for when the pathfinding heuristic is not <a href="https://en.wikipedia.org/wiki/Admissible_heuristic">admissable</a> (in short, when A* Inspector -> Settings -> Heuristic Scale was greater than 1).
  234. /// Now paths calculated with the heuristic scale greater than 1 might be slightly less optimal compared to before.
  235. /// If this is important I suggest you reduce the heuristic scale to compensate.
  236. /// Note that as before: a heuristic scale of 1 is the default and if it is greater than 1 then the calculated paths may no longer be the shortest possible ones.
  237. /// - Improved overall pathfinding performance by an additional 10-12% by heavily optimizing some core algorithms.
  238. /// - Improved performance of querying for the closest node to a point when using the PointGraph and <see cref="Pathfinding.PointGraph.optimizeForSparseGraph"/>.
  239. /// The improvements are around 7%.
  240. /// - Unified the API for the included movement scripts (AIPath, RichAI, AILerp) and added a large number of nice properties and functionality.
  241. /// - The <see cref="Pathfinding.IAstarAI"/> interface can now be used with all movement scripts.
  242. /// - To make it easier to migrate from Unity's navmesh system, this interface has been designed to be similar to Unity's NavmeshAgent API.
  243. /// - The interface has several nice properties like:
  244. /// <see cref="Pathfinding.IAstarAI.remainingDistance"/>,
  245. /// <see cref="Pathfinding.IAstarAI.reachedEndOfPath"/>,
  246. /// <see cref="Pathfinding.IAstarAI.pathPending"/>,
  247. /// <see cref="Pathfinding.IAstarAI.steeringTarget"/>,
  248. /// <see cref="Pathfinding.IAstarAI.isStopped"/>,
  249. /// <see cref="Pathfinding.IAstarAI.destination"/>, and many more.
  250. /// - You no longer need to set the destination of an agent using a Transform object, instead you can simply set the <see cref="Pathfinding.IAstarAI.destination"/> property.
  251. /// Note that when you upgrade, a new AIDestinationSetter component will be automatically created which has a 'target' field. So your existing code will continue to work.
  252. /// - Improved behavior when AIPath/RichAI characters move down slopes.
  253. /// Previously the way gravity was handled could sometimes lead to a 'bouncing' behavior unless the gravity was very high. Old behavior on the left, new behavior on the right.
  254. /// \htmlonly <video class="tinyshadow" controls loop><source src="images/changelog/ai_slope.mp4" type="video/mp4"></video> \endhtmlonly
  255. /// - Improved the grid graph inspector by adding preconfigured modes for different node shapes: square grids, isometric grids and hexagons.
  256. /// This also reduces clutter in the inspector since irrelevant options can be hidden.
  257. /// [Open online documentation to see images]
  258. /// - For 2D grid graphs the inspector will now show a single rotation value instead of a full 3D rotation which makes it a lot easier to configure.
  259. /// - Improved the performance of the <see cref="Pathfinding.RaycastModifier"/> significantly. Common speedups on grid graphs range from 2x to 10x.
  260. /// - The RaycastModifier now has a <see cref="Pathfinding.RaycastModifier.Quality quality"/>. The higher quality options use a new algorithm that is about the same performance (or slightly slower) compared to the RaycastModifier in previous versions
  261. /// however it often manages to simplify the path a lot more.
  262. /// The quality of the previous RaycastModifier with default settings corresponds to somewhere between the Low and Medium qualities.
  263. /// - Improved support for HiDPI (retina) screens as well as improved visual coherency for some icons.
  264. /// [Open online documentation to see images]
  265. /// - Improved the 'eye' icon for when a graph's gizmos are disabled to make it easier to spot.
  266. /// - Added <see cref="Pathfinding.GridGraph.CalculateConnectionsForCellAndNeighbours"/>.
  267. /// - AIPath now works with point graphs in 2D as well (assuming the 'rotate in 2D' checkbox is enabled).
  268. /// - Improved the performance of the RVONavmesh component when used together with navmesh cutting, especially when many navmesh cuts are moving at the same time.
  269. /// - A warning is now displayed in the editor if one tries to use both the AIDestinationSetter and Patrol components on an agent at the same time.
  270. /// - Improved linecasts on recast/navmesh graphs. They are now more accurate (there were some edge cases that previously could cause it to fail) and faster.
  271. /// Performance has been improved by by around 3x for longer linecasts and 1.4x for shorter ones.
  272. /// - Linecast methods will now assign the <see cref="Pathfinding.GraphHitInfo.node"/> field with the last node that was traversed in case no obstacle was hit.
  273. /// - Linecast on graphs now set the hit point to the endpoint of the line if no obstacle was hit. Previously the endpoint would be set to Vector3.zero. Thanks borluse for suggesting this.
  274. /// - Multithreading is now enabled by default (1 thread).
  275. /// - The DynamicGridObstacle component now works with 2D colliders.
  276. /// - Clicking on the graph name in the inspector will no longer focus the name text field.
  277. /// To edit the graph name you will now have to click the Edit/Pen button to the right of the graph name.
  278. /// Previously it was easy to focus the text field by mistake when you actually wanted to show the graph settings.
  279. /// [Open online documentation to see images]
  280. /// - Reduced memory usage of the PointGraph when using <see cref="Pathfinding.PointGraph.optimizeForSparseGraph"/>.
  281. /// - Improved the StartEndModifier inspector slightly.
  282. /// - The Seeker inspector now has support for multi-editing.
  283. /// - The AIPath and RichAI scripts now rotate to face the direction they are actually moving with when using local avoidance (RVO)
  284. /// instead of always facing the direction they want to move with. At very low speeds they fall back to looking the direction they want to move with to avoid jitter.
  285. /// - Improved the Seeker inspector. Unified the UI for setting tag penalties and determining if a tag should be traversable.
  286. /// [Open online documentation to see images]
  287. /// - Reduced string allocations for error messages when paths fail.
  288. /// - Added support for 2D physics to the <see cref="Pathfinding.RaycastModifier"/> component.
  289. /// - Improved performance of GraphUpdateObjects with updatePhysics=false on rotated navmesh/recast graphs.
  290. /// - Improved the inspector for AILerp.
  291. /// - RVO obstacles can now be visualized by enabling the 'Draw Obstacles' checkbox on the RVOSimulator component.
  292. /// [Open online documentation to see images]
  293. /// - Reduced allocations in the funnel modifier.
  294. /// - Added a 'filter' parameter to <see cref="Pathfinding.PathUtilities.BFS"/> and <see cref="Pathfinding.PathUtilities.GetReachableNodes"/>.
  295. /// - Added a method called <see cref="Pathfinding.IAstarAI.SetPath"/> to all movement scripts.
  296. /// - Added <see cref="Pathfinding.GraphNode.Graph"/>.
  297. /// - Added <see cref="Pathfinding.MeshNode.ContainsPoint(Vector3)"/> in addition to the already existing MeshNode.ContainsPoint(Int3).
  298. /// - Added <see cref="Pathfinding.MeshNode.ContainsPointInGraphSpace"/>.
  299. /// - Added <see cref="Pathfinding.TriangleMeshNode.GetVerticesInGraphSpace"/>.
  300. /// - Added Pathfinding.AstarData.FindGraph(predicate).
  301. /// - Added Pathfinding.AstarData.FindGraphWhichInheritsFrom(type).
  302. /// - Added a new class <see cref="Pathfinding.GraphUtilities"/> which has some utilities for extracting contours of graphs.
  303. /// - Added a new method \link Pathfinding.GridGraph.Linecast(GridNodeBase,GridNodeBase) Linecast(GridNodeBase,GridNodeBase)\endlink to the GridGraph class which is much faster than the normal Linecast methods.
  304. /// - Added \link Pathfinding.GridGraph.GetNode(int,int) GridGraph.GetNode(int,int)\endlink.
  305. /// - Added MeshNode.AddConnection(node,cost,edge) in addition to the already existing AddConnection(node,cost) method.
  306. /// - Added a \link Pathfinding.NavMeshGraph.recalculateNormals\endlink setting to the navmesh graph for using the original mesh normals. This is useful for spherical/curved worlds.
  307. /// - Documentation
  308. /// - Added a documentation page on error messages: error-messages (view in online documentation for working links).
  309. /// - Added a tutorial on how to create a wandering AI: wander (view in online documentation for working links).
  310. /// - Added tutorial on bitmasks: bitmasks (view in online documentation for working links).
  311. /// - You can now right-click on most fields in the Unity Inspector to bring up a link to the online documentation.
  312. /// [Open online documentation to see images]
  313. /// - Various other documentation improvements and fixes.
  314. /// - Changes
  315. /// - Height or collision testing for grid graphs now never hits triggers, regardless of the Unity Physics setting 'Queries Hit Triggers'
  316. /// which has previously controlled this.
  317. /// - Seeker.StartPath will no longer overwrite the path's graphMask unless it was explicitly passed as a parameter to the StartPath method.
  318. /// - The built in movement scripts no longer uses a coroutine for scheduling path recalculations.
  319. /// This shouldn't have any impact for you unless you have been modifying those scripts.
  320. /// - Replaced the MineBotAI script that has been used in the tutorials with MineBotAnimation.
  321. /// The new script does not inherit from AIPath so in the example scenes there is now one AIPath component and one MineBotAnimation script on each unit.
  322. /// - Removed prompt to make the package support UnityScript which would show up the first time you used the package in a new project.
  323. /// Few people use UnityScript nowadays so that prompt was mostly annoying. UnityScript support can still be enabled, see javscript (view in online documentation for working links).
  324. /// - If deserialization fails, the graph data will no longer be stored in a backup byte array to be able to be recovered later.
  325. /// This was not very useful, but more importantly if the graph data was very large (several megabytes) then Unity's Undo system would choke on it
  326. /// and essentially freeze the Unity editor.
  327. /// - The StartEndModifier's raycasting options are now only used if the 'Original' snapping option is used as that's the only one it makes sense for.
  328. /// - The RaycastModifier.subdivideEveryIter field has been removed, this is now always enabled except for the lowest quality setting.
  329. /// - The RaycastModifier.iterations field has been removed. The number of iterations is now controlled by the quality field.
  330. /// Unfortunately this setting cannot be directly mapped to a quality value, so if you are upgrading all RaycastModifier components will use the quality Medium after the upgrade.
  331. /// - The default value for <see cref="Pathfinding.RVOController.lockWhenNotMoving"/> is now false.
  332. /// - Tiles are now enabled by default on recast graphs.
  333. /// - Modifiers now register/unregister themselves with the Seeker component during OnEnable/OnDisable instead of Awake/OnDestroy.
  334. /// If you have written any custom modifiers which defines those methods you may have to add the 'override' modifier to those methods and call base.OnEnable/OnDisable.
  335. /// - When paths fail this is now always logged as a warning in the Unity console instead of a normal log message.
  336. /// - Node connections now store which edge of the node shape that is used for that node. This is used for navmesh/recast graphs.
  337. /// - The <see cref="Pathfinding.RVOController.velocity"/> property on the RVOController can now be assigned to and that has the same effect as calling ForceSetVelocity.
  338. /// - Deprecated the RVOController.ForceSetVelocity method. You should use the velocity property instead.
  339. /// - All graphs now explicitly implement the IUpdatableGraph interface.
  340. /// This is done to hide those methods (which should not be used directly) and thereby reduce confusion about which methods should be used to update graphs.
  341. /// - Hid several internal methods behind the IGraphInternals interface to reduce clutter in the documentation and IntelliSense suggestions.
  342. /// - Removed NavGraph.UnloadGizmoMeshes because it was not used for anything.
  343. /// - Since 4.0 individual graphs can be scanned using AstarPath.Scan. The older NavGraph.Scan method now redirects to that method
  344. /// which is more robust. This may cause slight changes in behavior, however the recommendation in the documentation has always been to use AstarPath.Scan anyway
  345. /// so I do not expect many to have used the NavGraph.Scan method.
  346. /// - Deprecated the NavGraph.ScanGraph method since it just does the same thing as NavGraph.Scan.
  347. /// - Deprecated the internal methods Path.LogError and Path.Log.
  348. /// - Added the new internal method Path.FailWithError which replaces LogError and Log.
  349. /// - Made the AIPath.TrySearchPath method private, it should never have been public to begin with.
  350. /// - Fixes
  351. /// - Fixed AIPath/RichAI throwing exceptions in the Unity Editor when drawing gizmos if the game starts while they are enabled in a disabled gameObject.
  352. /// - Fixed some typos in the documentation for PathUtilities.BFS and PathUtilities.GetReachableNodes.
  353. /// - For some point graph settings, path requests to points that could not be reached would fail completely instead of going to the closest node that it could reach. Thanks BYELIK for reporting this bug.
  354. /// If you for some reason have been relying on the old buggy behavior you can emulate it by setting A* Inspector -> Settings -> Max Nearest Node Distance to a very low value.
  355. /// - Fixed connection costs were assumed to be equal in both directions for bidirectional connections.
  356. /// - Fixed a compiler error when building for UWP/HoloLens.
  357. /// - Fixed some cases where circles used for debugging could have a much lower resolution than intended (<see cref="Pathfinding.Util.Draw.Debug.CircleXZ)"/>.
  358. /// - Fixed RVO agents which were locked but some script sent it movement commands would cause the RVO system to think it was moving
  359. /// even though it was actually stationary, causing some odd behavior. Now locked agents are always treated as stationary.
  360. /// - Fixed RVO obstacles generated from graph borders (using the RVONavmesh component) could be incorrect if a tiled recast graph and navmesh cutting was used.
  361. /// The bug resulted in an RVO obstacle around the tile that was most recently updated by a navmesh cut even where there should be no obstacle.
  362. /// - Fixed the RVONavmesh component could throw an exception in some cases when using tiled recast graphs.
  363. /// - Fixed a regression in some 4.0.x version where setting <see cref="Pathfinding.RVOController.velocity"/> to make the agent's movement externally controlled
  364. /// would not work properly (the system would always think the agent had a velocity of zero).
  365. /// - Fixed the RichAI movement script could sometimes get stuck on the border between two tiles.
  366. /// (due to a possibility of division by zero that would cause its velocity to become NaN).
  367. /// - Fixed AIPath/RichAI movement not working properly with rigidbodies in Unity 2017.3+ when the new physics setting "Auto Sync Transforms" was disabled. Thanks DougW for reporting this and coming up with a fix.
  368. /// - Fixed a few cases where <see cref="Pathfinding.RichAI"/> would automatically recalculate its path even though <see cref="Pathfinding.RichAI.canSearch"/> was disabled.
  369. /// - Fixed some compiler warnings when using Unity 2017.3 or later.
  370. /// - Fixed graphical artifacts in the graph visualization line drawing code which could show up at very large coordinate values or steep viewing angles.
  371. /// Differential calculus can be really useful sometimes.
  372. /// - Fixed the MultiTargetPathExample.cs (view in online documentation for working links).
  373. /// - Fixed the width/depth fields in the recast graph inspector causing warnings to be logged (introduced in 4.1.7). Thanks NoxMortem for reporting this.
  374. /// - Fixed the Pathfinding.GraphHitInfo.tangentOrigin field was offset by half a node when using linecasting on grid graphs.
  375. /// - Fixed the AIPath script with rotationIn2D would rotate so that the Z axis pointed in the -Z direction instead of as is common for Unity 2D objects: to point in the +Z direction.
  376. /// - Fixed the AILerp script with rotationIn2D would rotate incorrectly if it started out with the Z axis pointed in the -Z direction.
  377. /// - Clamp recast graph bounding box size to be non-zero on all axes.
  378. /// - The DynamicGridObstacle component will now properly update the graph when the object is deactivated since the object just disappeared and shouldn't block the graph anymore.
  379. /// Previously it only did this if the object was destroyed, not if it was deactivated.
  380. /// - Fixed <see cref="Pathfinding.AILerp"/> ceasing to work properly if one of the paths it tries to calculate fails.
  381. /// - Fixed the <see cref="Pathfinding.FunnelModifier"/> could yield a zero length path in some rare circumstances when using custom node links.
  382. /// This could lead to an exception in some of the movement scripts. Thanks DougW for reporting the bug.
  383. /// - Fixed calling Seeker.CancelCurrentPathRequest could in some cases cause an exception to be thrown due to multithreading race conditions.
  384. /// - Fixed a multithreading race condition which could cause a path canceled by Seeker.CancelCurrentPathRequest to not actually be canceled.
  385. /// - Fixed a rare ArrayOutOfBoundsException when using the FunnelModifier with the 'unwrap' option enabled.
  386. /// - Fixed Seeker -> Start End Modifier could not be expanded in the Unity inspector. Thanks Dee_Lucky for reporting this.
  387. /// - Fixed a few compatiblity bugs relating to AIPath/RichAI that were introduced in 4.1.0.
  388. /// - Fixed funnel modifier could sometimes fail if the agent started exactly on the border between two nodes.
  389. /// - Fixed another bug which could cause the funnel modifier to produce incorrect results (it was checking for colinearity of points in 2D instead of in 3D).
  390. /// - Fixed the funnel modifier would sometimes clip a corner near the end of the path.
  391. /// - Fixed ProceduralGridMover would not detect user defined graphs that were subclasses of the GridGraph class. Thanks viveleroi for reporting this.
  392. /// - Fixed enabling and disabling a AIPath or RichAI component a very large number of times could potentially have a negative performance impact.
  393. /// - Fixed AIPath/RichAI would continue searching for paths even when the component had been disabled.
  394. /// - MeshNode.ContainsPoint now supports rotated graphs properly. MeshNode is used in navmesh and recast graphs.
  395. /// - Fixed Linecast for navmesh and recast graphs not working for rotated graphs.
  396. /// - Fixed RVONavmesh component not working properly with grid graphs that had height differences.
  397. /// - Fixed 2D RVO agents sometimes ignoring obstacles.
  398. /// - Fixed RVONavmesh not removing the obstacles it had created when the component was disabled.
  399. /// - Fixed RaycastModifier could miss obstacles when thick raycasting was used due to Unity's Physics.SphereCast method not
  400. /// reporting hits very close to the start of the raycast.
  401. /// - In the free version the inspector for RaycastModifier now displays a warning if graph raycasting is enabled since
  402. /// for all built-in graphs raycasts are only supported in the pro version.
  403. /// - Fixed some cases where the funnel modifier would produce incorrect results.
  404. /// - Fixed typo in a private method in the AstarPath class. Renamed the UpdateGraphsInteral method to UpdateGraphsInternal.
  405. /// - Fixed AIPath.remainingDistance and AIPath.targetReached could be incorrect for 1 frame when a new path had just been calculated (introduced in a previous beta release).
  406. ///
  407. /// - 4.0.11 (2017-09-09)
  408. /// - Fixed paths would ignore the ITraversalProvider (used for the turn based utilities) on the first node of the path, resulting in successful paths where they should have failed.
  409. /// - Fixed BlockManager.BlockMode.AllExceptSelector could often produce incorrect results. Thanks Cquels for spotting the bug.
  410. /// - Fixed various bugs related to destroying/adding graphs that could cause exceptions. Thanks DougW for reporting this.
  411. /// - Fixed destroying a grid graph would not correctly clear all custom connections. Thanks DougW for reporting this.
  412. /// - Fixed the MultiTargetPath did not reset all fields to their default values when using path pooling.
  413. /// - Added some additional error validation in the MultiTargetPath class.
  414. /// - Fixed scanning a recast graph that was not using tiles using Unity 2017.1 or later on Windows could block indefinitely. Thanks David Drummond and ceebeee for reporting this.
  415. /// - Improved compatibility with Nintendo Switch. Thanks Noogy for the help.
  416. /// - Fixed GraphUpdateScene would not handle the GameObject's scale properly which could cause it to not update some nodes.
  417. /// - Fixed a regression in 4.0 which could cause the error to be omitted from log messages when paths failed.
  418. /// - Fixed several bugs relating to <see cref="Pathfinding.NNConstraint.distanceXZ"/> and <see cref="Pathfinding.NavmeshBase.nearestSearchOnlyXZ"/>. Thanks koirat for reporting this.
  419. /// - Fixed scanning a graph that threw an error would prevent any future scans. Thanks Baste for reporting this.
  420. /// - Added a new get started video tutorial. See getstarted (view in online documentation for working links).
  421. /// - The PointGraph.nodeCount property is now protected instead of private, which fixes some compatibility issues.
  422. /// - Improved compatibility with Unity 2017.1, esp. when using the experimental .Net 4.6 target. Thanks Scott_Richmond for reporting the issues.
  423. /// - Fixed DynamicGridObstacle trying to update the graphs even when outside of play mode.
  424. /// - Fixed runtime error when targeting the Windows Store. Thanks cedtat for reporting the bug.
  425. /// - Fixed compilation error when targeting the Windows Store. Introduced in 4.0.3. Thanks cedtat for reporting the bug.
  426. ///
  427. /// - 4.0.10 (2017-05-01)
  428. /// - Fixed compiler errors in the free version because the ManualRVOAgent.cs script being included by mistake. Thanks hummerbummer for reporting the issue.
  429. /// - Fixed Unity's scene view picking being blocked by graph gizmos. Thanks Scott_Richmond for reporting the bug.
  430. ///
  431. /// - 4.0.9 (2017-04-28)
  432. /// - Significantly improved performance and reduced allocations when recalculating indivudal recast tiles during runtime and there are terrains in the scene.
  433. /// - Fixed the GraphUpdateScene inspector showing a warning for one frame after the 'convex' field has been changed.
  434. /// - Fixed a few compiler warnings in Unity 5.6. Thanks TotalXep for reporting the issue.
  435. /// - Fixed graph drawing could generate large amounts of garbage due to a missing GetHashCode override which causes Mono to have to allocate some dummy objects.
  436. /// - Fixed graph gizmo lines could be rendered incorrectly on Unity 5.6 on mac and possibly on Windows too.
  437. ///
  438. /// - 4.0.8 (2017-04-28)
  439. /// - Added <see cref="Pathfinding.AIBase.rotationIn2D"/> to the AIPath script. It makes it possible to use the Y axis as the forward axis of the character which is useful for 2D games.
  440. /// - Exposed the GridGraph.LayerCount property which works for both grid graphs and layered grid graphs (for grid graphs it always returns 1).
  441. /// - Made the LayerGridGraph.layerCount field internal to discourage its use outside the LayerGridGraph class.
  442. /// - Fixed exception when destroying some graph types (introduced in 4.0.6). Thanks unfalco for reporting the bug.
  443. /// - Fixed exception in GridGraph.GetNodesInRegion when being called with an invalid rectangle or a rectangle or bounds object that was completely outside the graph. Thanks WillG for finding the bug.
  444. /// - Fixed AIPath/RichAI not rotating to the correct direction if they started in a rotation such that the forward axis was perpendicular to the movement plane.
  445. ///
  446. /// - 4.0.7 (2017-04-27)
  447. /// - Fixed 2D example scenes had their grids rotated by (90,0,0) instead of (-90,0,0).
  448. /// It doesn't matter for those scenes, but the (-90,0,0) leads to more intuitive axis rotations for most use cases. Thanks GeloMan for noticing this.
  449. /// - Renamed AISimpleLerp to AILerp in the component menu as the documentation only refers to it by the name 'AILerp'.
  450. /// - Added a new documentation page and video tutorial (pathfinding-2d) (view in online documentation for working links) showing how to configure pathfinding in 2D games.
  451. ///
  452. /// - 4.0.6 (2017-04-21)
  453. /// - Fixed creating a RichAI and in the same frame setting the target and calling UpdatePath would always result in that path being canceled.
  454. /// - Fixed a race condition which meant that if you called RichAI.UpdatePath, AILerp.SearchPath or AIPath.SearchPath during the same frame that the agent was created
  455. /// then the callback for that path would sometimes be missed and the AI would wait indefinitely for it. This could cause the agents to sometimes never start moving.
  456. /// - Fixed adding a new graph while graph updates were running at the same time could potentially cause errors.
  457. /// - Added NavGraph.exists which will become false when a graph has been destroyed.
  458. /// - Fixed TileHandlerHelper could throw exceptions if the graph it was tracking was destroyed.
  459. /// - Fixed TileHandlerHelper not detecting new NavmeshCut or NavmeshAdd components that were created before the
  460. /// TileHandlerHelper component was created or when it was disabled.
  461. /// - TileHandlerHelper no longer logs an error if it is created before a recast/navmesh graph exists in the scene
  462. /// and when one is created the TileHandlerHelper will automatically detect it and start to update it.
  463. /// - Fixed TileHandlerHelper could throw exceptions if the graph it was tracking changed dimensions.
  464. /// - Fixed recast graphs would always rasterize capsule colliders as if they had their 'direction' setting set to 'Y-axis'. Thanks emrys90 for reporting the bug.
  465. /// - The package now contains a 'documentation.html' file which contains an offline version of the 'Get Started' tutorial.
  466. ///
  467. /// - 4.0.5 (2017-04-18)
  468. /// - Improved compatibility with Opsive's Behavior Designer - Movement Pack (https://www.assetstore.unity3d.com/en/#!/content/16853).
  469. /// - The 4.0 update combined with the Movement Pack caused some compiler errors previously.
  470. ///
  471. /// - 4.0.4 (2017-04-17)
  472. /// - Fixed the funnel modifier not working if 'Add Points' on the Seeker's Start End Modifier was enabled. Thanks Blaze_Barclay for reporting it.
  473. /// - Fixed code typo in the write-modifiers (view in online documentation for working links) tutorial as well as made a few smaller improvements to it.
  474. /// - Fixed some cases where the LegacyRVOController would not behave like the RVOController before version 4.0.
  475. /// - Fixed LegacyAIPath not using the same custom inspector as the AIPath component.
  476. ///
  477. /// - 4.0.3 (2017-04-16)
  478. /// - Improved code style and improved documentation for some classes.
  479. /// - Reduced memory allocations a bit when using the NavmeshAdd component.
  480. /// - Fixed graph types not necessarily being initialized when scanning the graph outside of play mode.
  481. /// - Fixed LayerGridGraph not reporting scanning progress properly.
  482. /// This caused it to not work well with ScanAsync and when scanning the graph in the editor the progress bar would only update once the whole graph had been scanned.
  483. /// - Removed the DebugUtility class which was only used for development when debugging the recast graph.
  484. ///
  485. /// - 4.0.2 (2017-04-16)
  486. /// - Fixed a minor bug in the update checker.
  487. /// - Deduplicated code for drawing circles and other shapes using Debug.Draw* or Gizmos.Draw* and moved this code to a new class Pathfinding.Util.Draw.
  488. ///
  489. /// - 4.0.1 (2017-04-15)
  490. /// - Improved how AIPath and RichAI work with rigidbodies.
  491. /// - Added option for gravity to AIPath.
  492. /// - Removed the RichAI.raycastingForGroundPlacement field as it is automatically enabled now if any gravity is used.
  493. /// - AIPath and RichAI now inherit from the same base class Pathfinding.AIBase.
  494. ///
  495. /// - 4.0 (2017-04-10)
  496. /// - Upgrade Notes
  497. /// - This release contains some significant changes. <b>It is strongly recommended that you back up your
  498. /// project before upgrading</b>.
  499. /// - If you get errors immediately after upgrading, try to delete the AstarPathfindingProject folder
  500. /// and import the package again. Sometimes UnityPackages will leave old files which can cause issues.
  501. /// - Moved some things to inside the Pathfinding namespace to avoid naming collisions with other packages.
  502. /// Make sure you have the line 'using Pathfinding;' at the top of your scripts.
  503. /// Some example scripts have been moved to the Pathfinding.Examples namespace.
  504. /// - The RVOController component no longer handles movement as it turned out that was a bad idea.
  505. /// Having multiple components that handled movement (e.g RichAI and RVOController) didn't turn out well
  506. /// and it was very hard to configure the settings so that it worked well.
  507. /// The RVOController now exposes the CalculateMovementDelta method which allows other scripts to
  508. /// ask it how the local avoidance system thinks the character should move during this frame.
  509. /// If you use the RichAI or AIPath components for movement, everything should work straight away.
  510. /// If you use a custom movement script you may need to change your code to use the CalculateMovementDelta
  511. /// method for movement. Some settings may need to be tweaked, but hopefully it should not be too hard.
  512. /// - Node connections are now represented using an array of structs (of type <see cref="Pathfinding.Connection"/>) instead of
  513. /// one array for target nodes and one array for costs.
  514. /// - When upgrading an existing project legacy versions of the RVOController, RichAI, AIPath and GraphUpdateScene components
  515. /// will be used for compatibility reasons. You will have to click a button in the inspector to upgrade them to the latest versions.
  516. /// I have tried to make sure that the movement scripts behave the same as they did before version 4.0, but it is possible that there are some minor differences.
  517. /// If you have used a custom movement script which inherits from AIPath or RichAI then the legacy components cannot be used automatically, instead the new versions will be used from the start.
  518. /// - New Features And Improvements
  519. /// - Local Avoidance
  520. /// - The RVO system has been cleaned up a lot.
  521. /// - Agents will now always avoid walls and obstacles even if that would put them on a collision course with another agent.
  522. /// This helps with a previous problem of agents being able to be pushed into walls and obstacles (note that RVONavmesh or RVOSquareObstacle still need to be used).
  523. /// - The RVOSimulator can now be configured for XZ space or XY space (2D).
  524. /// - The RVOController no longer handles movement itself as this turned out to be a really bad idea (see upgrade notes section).
  525. /// - The RVOController can now be used to stop at a target much more precisely than before using the SetTarget method.
  526. /// - Agents are now <see cref="Pathfinding.RVO.RVOSimulator.symmetryBreakingBias biased"/> towards passing other agents on the right side, this helps resolve some situations
  527. /// with a lot of symmetry much faster.
  528. /// - All fuzzy and hard to adjust parameters from the <see cref="Pathfinding.RVO.RVOSimulator"/> component have been removed.
  529. /// It should now be much easier to configure.
  530. /// - The RichAI movement script now works a lot better with the RVOController.
  531. /// Previously the movement could be drastically different when the RVOController was used
  532. /// and local avoidance didn't work well when the agent was at the edge of the navmesh.
  533. /// - Improved gizmos for the RVOController.
  534. /// - Added <see cref="Pathfinding.RVO.RVOController.ForceSetVelocity"/> to use when you want agents to avoid a player (or otherwise externally controlled) character.
  535. /// - RVO agents can now have different priorities, lower priority agents will avoid higher priority agents more.
  536. /// - The neighbour distance field is now automatically calculated. This makes it easier to configure the agents and it will
  537. /// also improve performance slightly when the agents are moving slowly (for example in very crowded scenarios).
  538. /// - Added support for grid graphs to <see cref="Pathfinding.RVO.RVONavmesh"/>.
  539. /// - Added a new example scene for RVO in 2D
  540. /// \htmlonly <video class="tinyshadow" controls loop><source src="images/3vs4/rvo2d.mp4" type="video/mp4"></video> \endhtmlonly
  541. /// - General
  542. /// - Huge increase in the performance of graph gizmos.
  543. /// This was accomplished by bypassing the Unity Gizmos and creating a custom gizmo rendererer that is able to retain
  544. /// the gizmo meshes instead of recreating them every frame (as well as using a lot fewer draw calls than Unity Gizmos).
  545. /// Therefore the graphs usually only need to check if the nodes have changed, and only if they have changed they will
  546. /// rebuild the gizmo meshes. <b>This may cause graph updates to seem like they introduce more lag than they actually do</b>
  547. /// since a graph update will also trigger a gizmo rebuild. So make sure to always profile with gizmos disabled.
  548. /// For a 1000*1000 graph, which previously almost froze the editor, the time per frame went from over 4200 ms to
  549. /// around 90 ms when no nodes had changed.
  550. /// \htmlonly <video class="tinyshadow" controls loop><source src="images/3vs4/gizmo_performance.mp4" type="video/mp4"></video> \endhtmlonly
  551. /// - Improved the style of graph gizmos. A solid surface is now rendered instead of only the connections between the nodes.
  552. /// The previous mode of rendering only connections is of course still available.
  553. /// [Open online documentation to see images]
  554. /// - Added a new example scene showing how to configure hexagon graphs.
  555. /// - Added gizmos for hexagon graphs (grid graphs with certain settings).
  556. /// [Open online documentation to see images]
  557. /// - Implemented async scanning. \link AstarPath.ScanAsync AstarPath.active.ScanAsync \endlink is an IEnumerable that can be iterated over several frames
  558. /// so that e.g a progress bar can be shown while calculating the graphs. Note that this does not guarantee
  559. /// a good framerate, but at least you can show a progress bar.
  560. /// - Improved behaviour of the AIPath movement script.
  561. /// - AIPath now works in the XY plane as well. In fact it works with any graph rotation.
  562. /// The Z axis is always the forward axis for the agent, so for 2D games with sprites you may have to attach the sprite
  563. /// to a child object which is rotated for it to show up correctly.
  564. /// - Previously the slowdownDistance had to be smaller than the forwardLook field otherwise the character
  565. /// could slow down even when it had not reached the end of the path.
  566. /// - The agent should stop much more precisely at the end of the path now.
  567. /// - The agent now rotates with a fixed angular speed instead of a varying one as this is often more realistic.
  568. /// - Reduced the likelihood of the agent spinning around when it reaches the end of the path.
  569. /// - It no longer uses the forwardLook variable.
  570. /// It was very tricky to set correctly, now the pickNextWaypointDist variable is used for everything instead
  571. /// and generally this should give you smoother movement.
  572. /// - Improved behaviour of the \link Pathfinding.RichAI RichAI \endlink movement script.
  573. /// - The agent should stop much more precisely at the end of the path now.
  574. /// - Reduced the likelihood of the agent spinning around when it reaches the end of the path.
  575. /// - Scanning the graph using AstarPath.Scan will now profile the various parts of the graph scanning
  576. /// process using the Unity profiler (Profiler.BeginSample and Profiler.EndSample).
  577. /// - \link Pathfinding.DynamicGridObstacle DynamicGridObstacle \endlink will now update the graph immediately if an object with that component is created during runtime
  578. /// instead of waiting until it was moved for the first time.
  579. /// - \link Pathfinding.GraphUpdateScene GraphUpdateScene \endlink and \link Pathfinding.GraphUpdateShape GraphUpdateShape \endlink can now handle rotated graphs a lot better.
  580. /// The rotation of the object the GraphUpdateScene component is attached to determines the 'up' direction for the shape
  581. /// and thus which points will be considered to be inside the shape.
  582. /// The world space option had to be removed from GraphUpdateScene because it didn't really work with rotated graphs.
  583. /// The lockToY option for GraphUpdateScene has also been removed because it wasn't very useful and after this change it would only have had an impact
  584. /// in rare cases.
  585. /// - Improved \link Pathfinding.GraphUpdateScene GraphUpdateScene \endlink editor. When editing the points in the scene view it now shows helper lines
  586. /// to indicate where a new point is going to be added and which other points it will connect to
  587. /// as well as several other minor improvements.
  588. /// \htmlonly <video class="tinyshadow" controls loop><source src="images/3vs4/graph_update_scene_sd.mp4" type="video/mp4"></video> \endhtmlonly
  589. /// - \link Pathfinding.GraphUpdateScene GraphUpdateScene \endlink now supports using the bounds from 2D colliders and the shape from PolygonCollider2D.
  590. /// - Added opaqueness slider for the gizmos under Inspector -> Settings -> Colors.
  591. /// - Added \link Pathfinding.Path.BlockUntilCalculated Path.BlockUntilCalculated \endlink which is identical to AstarPath.BlockUntilCalculated.
  592. /// - Added Seeker.CancelCurrentPathRequest.
  593. /// - Added \link Pathfinding.NavGraph.GetNodes NavGraph.GetNodes(System.Action<GraphNode>) \endlink which calls a delegate with each node in the graph.
  594. /// Previously NavGraph.GetNodes(GraphNodeDelegateCancelable) existed which did the same thing but required the delegate
  595. /// to return true if it wanted the graph to continue calling it with more nodes. It turns out this functionality was very rarely needed.
  596. /// - Individual graphs can now be scanned using <see cref="AstarPath.Scan(NavGraph)"/> and other related overloads.
  597. /// - Improved \link Pathfinding.BinaryHeap priority queue \endlink performance. On average results in about a 2% overall pathfinding performance increase.
  598. /// - ObjectPool<T> now requires a ref parameter when calling Release with an object to help prevent silly bugs.
  599. /// - 'Min Area Size' has been removed. The edge cases are now handled automatically.
  600. /// - Added ObjectPoolSimple<T> as a generic object pool (ObjectPool<T> also exists, but for that T must implement IAstarPooledObject).
  601. /// - \link Pathfinding.RaycastModifier RaycastModifier \endlink now supports multi editing.
  602. /// - Added \link Pathfinding.GraphNode.RandomPointOnSurface GraphNode.RandomPointOnSurface \endlink.
  603. /// - Added \link Pathfinding.GraphNode.SurfaceArea GraphNode.SurfaceArea \endlink.
  604. /// - \link Pathfinding.Int2 Int2 \endlink and \link Pathfinding.Int3 Int3 \endlink now implement IEquatable for slightly better performance and fewer allocations in some places.
  605. /// - \link Pathfinding.Examples.LocalSpaceRichAI LocalSpaceRichAI \endlink can now be used with any rotation (even things like moving on an object that is upside down).
  606. /// - The \link Pathfinding.FunnelModifier funnel modifier \endlink can now handle arbitrary graphs (even graphs in the 2D plane) if the new \link Pathfinding.FunnelModifier.unwrap unwrap \endlink option is enabled.
  607. /// - The \link Pathfinding.FunnelModifier funnel modifier \endlink can split the resulting path at each portal if the new \link Pathfinding.FunnelModifier.splitAtEveryPortal splitAtEveryPortal \endlink option is enabled.
  608. /// - Recast/Navmesh Graphs
  609. /// - Recast graph scanning is now multithreaded which can improve scan times significantly.
  610. /// - Recast graph scanning now handles large worlds with lots of objects better. This can improve scan times significantly.
  611. /// \htmlonly <video class="tinyshadow" controls loop><source src="images/3vs4/recast_scanning_performance.mp4" type="video/mp4"></video> \endhtmlonly
  612. /// - Improved performance of nearest node queries for Recast/navmesh graphs.
  613. /// - Editing navmesh cut properties in the inspector now forces updates to happen immediately which makes editing easier.
  614. /// - Long edges in recast graphs are now split at tile borders as well as at obstacle borders.
  615. /// This can in particular help on terrain maps where the tile borders do not follow the elevation that well
  616. /// so the max edge length can be reduced to allow the border to follow the elevation of the terrain better.
  617. /// - Recast graphs can now be rotated arbitrarily.
  618. /// - Navmesh cutting still works!
  619. /// - The RichAI script currently does not support movement on rotated graphs, but the AIPath script does.
  620. /// - Improved performance of navmesh cutting for large worlds with many tiles and NavmeshAdd components.
  621. /// - Navmesh graphs and recast graphs now share the same base code which means that navmesh graphs
  622. /// now support everything that previously only recast graphs could be used for, for example
  623. /// navmesh cutting.
  624. /// - The NavmeshCut inspector now shows a warning if no TileHandlerHelper component is present in the scene.
  625. /// A TileHandlerHelper component is necessary for the NavmeshCuts to update the graphs.
  626. /// - Recast graphs now use less memory due to the BBTree class now using around 70% less memory per node.
  627. /// - Recast graphs now allocate slightly less memory when recalculating tiles or scanning the graph.
  628. /// - Cell height on Recast graphs is now automatically set to a good value.
  629. /// - Navmesh cutting is now a bit better at using object pooling to avoid allocations.
  630. /// - TileHandlerHelper now updates the tiles properly when one or multiple tiles on the recast graph are recalculated
  631. /// due to a graph update or because it was rescanned.
  632. /// - Navmesh cutting now uses more pooling to reduce allocations slightly.
  633. /// - Improved performance of loading and updating (using navmesh cutting) recast tiles with a large number of nodes.
  634. /// - Grid Graphs
  635. /// - Added LevelGridNode.XCoordinateInGrid, LevelGridNode.ZCoordinateInGrid, LevelGridNode.LayerCoordinateInGrid.
  636. /// - Added GridGraph.GetNodesInRegion(IntRect).
  637. /// Also works for layered grid graphs.
  638. /// - Layered grid graphs now have support for 'Erosion Uses Tags'.
  639. /// - Added GridGraph.CalculateConnections(GridNodeBase) which can be used for both grid graphs and layered grid graphs.
  640. /// - Grid graphs can now draw the surface and outline of the graph instead of just the connections between the nodes.
  641. /// The inspector now contains several toggles that can be used to switch between the different rendering modes.
  642. /// - The ProceduralGridMover component now works with LayerGridGraph as well.
  643. /// - Added GridGraph.RecalculateCell(x,y) which works both for grid graphs and layered grid graphs.
  644. /// This replaces the UpdateNodePositionCollision method and that method is now deprecated.
  645. /// - Improved GridGraph.RelocateNodes which is now a lot more resilient against floating point errors.
  646. /// - Added dimetric (60°) to the list of default values for the isometric angle field on grid graphs.
  647. /// - Changing the width/depth of a grid graph will now keep the current pivot point at the same position instead of always keeping the bottom left corner fixed.
  648. /// (the pivot point can be changed to the center/bottom left/top left/top right/bottom right right next to the position field in the grid graph inspector)
  649. /// - Improved fluidity and stability when resizing a grid graph in the scene view.
  650. /// It now snaps to full node increments in size.
  651. /// - Grid graphs now display a faint grid pattern in the scene view even when the graph is not scanned
  652. /// to make it easier to position and resize the graph.
  653. /// - Improved styling of some help boxes in the grid graph inspector when using the dark UI skin.
  654. /// - The size of the unwalkable node gizmo (red cube) on grid graphs is now based on the node size to avoid the gizmos being much larger or much smaller than the nodes.
  655. /// - Implemented \link Pathfinding.ABPath.EndPointGridGraphSpecialCase special case for paths on grid graphs \endlink so that if you request a path to an unwalkable node with several
  656. /// walkable nodes around it, it will now not pick the closest walkable node to the requested target point and find a path to that
  657. /// but it will find the shortest path which goes to any of the walkable nodes around the unwalkable node.
  658. /// \htmlonly <a href="images/abpath_grid_not_special.gif">Before</a>, <a href="images/abpath_grid_special.gif">After</a> \endhtmlonly.
  659. /// This is a special case of the MultiTargetPath, for more complicated configurations of targets the multi target path needs to be used to be able to handle it correctly.
  660. /// - Changes
  661. /// - Node connections are now represented using an array of structs (of type Connection) instead of
  662. /// one array for target nodes and one array for costs.
  663. /// - When scanning a graph in the editor, the progress bar is not displayed until at least 200 ms has passed.
  664. /// Since displaying the progress bar is pretty slow, this makes scanning small graphs feel more snappy.
  665. /// - GridGraph and LayerGridGraph classes now have a 'transform' field instead of a matrix and inverseMatrix fields.
  666. /// The GraphTransform class also has various other nice utilities.
  667. /// - Moved mesh collecting code for Recast graphs to a separate class to improve readability.
  668. /// - Refactored out large parts of the AstarPath class to separate smaller classes to improve readability and increase encapsulation.
  669. /// - AstarPath.RegisterSafeUpdate is now implemented using WorkItems. This yields a slightly different behavior (previously callbacks added using RegisterSafeUpdate would
  670. /// always be executed before work items), but that should rarely be something that you would depend on.
  671. /// - Replaced AstarPath.BlockUntilPathQueueBlocked with the more robust AstarPath.PausePathfinding method.
  672. /// - The default radius, height and center for RVOControllers is now 0.5, 2 and 1 respectively.
  673. /// - To reduce confusion. The second area color is now a greenish color instead of a red one.
  674. /// The red color would often be mistaken as indicating unwalkable nodes instead of simply a different connected component.
  675. /// Hopefully green will be a more neutral color.
  676. /// - Renamed AstarPath.astarData to AstarPath.data.
  677. /// - Renamed NavmeshCut.useRotation and NavmeshAdd.useRotation to useRotationAndScale (since they have always affected scale too).
  678. /// - Renamed GridGraph.GenerateMatrix to GridGraph.UpdateTransform to be consistent with recast/navmesh graphs.
  679. /// The GenerateMatrix method is now deprecated.
  680. /// - Renamed AstarPath.WaitForPath to AstarPath.BlockUntilCalculated.
  681. /// - Renamed GridNode.GetConnectionInternal to HasConnectionInDirection.
  682. /// - Renamed NNInfo.clampedPosition to NNInfo.position.
  683. /// - Renamed GridGraph.GetNodesInArea to GetNodesInRegion to avoid confusing the word 'area' for what is used to indicate different connected components in graphs.
  684. /// - Renamed AIPath.turningSpeed to <see cref="Pathfinding.AIPath.rotationSpeed"/>.
  685. /// - Deprecated Seeker.GetNewPath.
  686. /// - Deprecated NavGraph.matrix, NavGraph.inverseMatrix, NavGraph.SetMatrix and NavGraph.RelocateNodes(Matrix4x4,Matrix4x4).
  687. /// They have been replaced with a single transform field only available on some graph types as well as a few other overloads of teh RelocateNodes method.
  688. /// - Changed the signature of NavGraph.GetNodes(GraphNodeDelegateCancelable) to the equivalent NavGraph.GetNodes(System.Func<GraphNode,bool>).
  689. /// - Replaced all instances of GraphNodeDelegate with the equivalent type System.Action<GraphNode>.
  690. /// - Made a large number of previously public methods internal to reduce confusion about which methods one should use in a class and make the documentation easier to read.
  691. /// In particular the Path class has had its set of public methods reduced a lot.
  692. /// - Made AstarData.AddGraph(NavGraph) private. Scripts should use AstarData.AddGraph(System.Type) instead.
  693. /// - Moved internal fields of NNInfo into a new NNInfoInternal struct to make the API easier to use. Previously NNInfo contained some internal fields, but now they are only in NNInfoInternal.
  694. /// - Moved GetNeighbourAlongDirection to GridNodeBase and made it public.
  695. /// - An overload of the GridGraph.CalculateConnections method has been made non-static.
  696. /// - LayerGridGraph.LinkedLevelNode and LayerGridGraph.LinkedLevelCell are now private classes since they are only used by the LayerGridGraph.
  697. /// - MonoModifier.OnDestroy is now a virtual function.
  698. /// - AstarPath.IsUsingMultithreading and NumbParallelThreads have been made non-static.
  699. /// - AstarPath.inGameDebugPath is now private.
  700. /// - AstarPath.lastScanTime is now read only.
  701. /// - Removed the 'climb axis' field from grid graphs. The axis is now automatically set to the graph's UP direction (which is
  702. /// the only direction that makes sense and all other directions can be transformed to this one anyway).
  703. /// - Removed the 'worldSpace' parameter from RecastGraph.ReplaceTile, it is no longer possible to supply world space vertices to
  704. /// that method since graph space vertices are required for some things.
  705. /// - Removed BBTree.QueryCircle and BBTree.Query since they were not used anywhere.
  706. /// - Removed the Path.searchIterations field because it wasn't very useful even as debug information.
  707. /// - Removed the Path.maxFrameTime field because it was not used.
  708. /// - Removed the Path.callTime property because it was not used.
  709. /// - Removed the ABPath.startHint, ABPath.endHint fields because they were not used.
  710. /// - Removed the ABPath.recalcStartEndCosts field because it was not used.
  711. /// - Removed the RecursiveBinary and RecursiveTrinary modes for RichAI.funnelSimplification because the Iterative mode
  712. /// was usually the best and fastest anyway (also the other two modes had a rare bug where they could get cought in infinite loops).
  713. /// - Removed the Polygon.Subdivide method because it was not used anywhere.
  714. /// - Removed the NavGraph.Awake method because it was not used for anything.
  715. /// - Removed ASTAR_OPTIMIZE_POOLING from Optimization tab. It is now always enabled in standalone builds and always disabled in the Unity editor.
  716. /// - Removed various unused Recast code.
  717. /// - Removed support for forcing the inspector skin to be dark or light. The value provided by EditorGUIUtility.isProSkin is always used now.
  718. /// - Removed multiplication operator for Int3 with a Vector3 because it is a nonstandard operation on vectors (and it is not that useful).
  719. /// - Removed the since long deprecated example script AIFollow.
  720. /// - Removed the AdaptiveSampling algorithm for local avoidance. Only GradientDescent is used now.
  721. /// - Removed empty PostProcess method in NavMeshGraph.
  722. /// - Fixes
  723. /// - Fixed RichAI and AIPath trying to use CharacterControllers even if the CharacterController component was disabled.
  724. /// - Fixed rotated recast/navmesh graphs would ensure each node's vertices were laid out clockwise in XZ space instead of in graph space which could cause parts of the graph to become disconnected from the rest.
  725. /// - Fixed a bug where graphs could fail to be deserialized correctly if the graph list contained a null element
  726. /// - Fixed a bug where the json serializer could emit True/False instead of true/false which is the proper json formatting.
  727. /// - Fixed LayerGridGraphs' "max climb" setting not working properly with rotated graphs.
  728. /// - Fixed LayerGridGraphs' "character height" setting not working properly with rotated graphs.
  729. /// - Fixed LayerGridGraphs assuming there were no obstacles nearby if no ground was found.
  730. /// - Fixed DynamicGridObstacle getting caught in an infinite loop if there was no AstarPath component in the scene when it was created. Thanks MeiChen for finding the bug.
  731. /// - Fixed NodeLink2 deserialization causing exceptions if the node hadn't linked to anything when it was serialized. Thanks Skalev for finding the bug.
  732. /// - Fixed the AlternativePath modifier could crash the pathfinding threads if it logged a warning since it used the Debug.Log(message,object) overload which
  733. /// can only be used from the Unity thread.
  734. /// - Fixed an issue where layer mask fields in graph editors would show 'Nothing' if they only included layers which had no name set.
  735. /// - Fixed potential memory leak.
  736. /// Paths in the path pool would still store the callback which is called when the path has been calculated
  737. /// which that means it would implicitly hold a reference to the object which had the method that would be called.
  738. /// Thanks sehee for pointing this out.
  739. /// - Fixed GridNode.ClosestPointOnNode could sometimes return the wrong y coordinate relative to the graph (in particular when the graph was rotated) and the y coordinate would not snap to the node's surface.
  740. /// - Fixed AstarData.AddGraph would fill *all* empty slots in the graph array with the graph instead of just the first. Thanks bitwise for finding the bug.
  741. /// - Improved compatibility with Unity 5.5 which was need due to the newly introduced UnityEngine.Profiling namespace.
  742. /// - Fixed graph updates on LayeredGridGraphs not respecting GraphUpdateObject.resetPenaltyOnPhysics.
  743. /// - Fixed potential memory leak when calling RecalculateCell on a layered grid graph.
  744. /// - LevelGridNode.ContainsConnection now reports correct values (previously it would only check
  745. /// non-grid connections).
  746. /// - Fixed not being able to deserialize settings saved with some old versions of the A* Pathfinding Project.
  747. /// - Tweaked ListPool to avoid returning lists with a very large capacity when a small one was requested
  748. /// as this could cause performance problems since Clear is O(n) where n is the capacity (not the size of the list).
  749. /// - Fixed GraphUpdateScene causing 'The Grid Graph is not scanned, cannot update area' to be logged when exiting play mode.
  750. /// - Fixed scanning a recast graph could in very rare circumstances throw a 'You are trying to pool a list twice' exception due to a multithreading
  751. /// race condition.
  752. /// - Fixed recast/navmesh graphs could return the wrong node as the closest one in rare cases, especially near tile borders.
  753. /// - Fixed another case of recast/navmesh graphs in rare cases returning the wrong node as the closest one.
  754. /// - Fixed gizmo drawing with 'Show Search Tree' enabled sometimes right after graph updates drawing nodes outside the
  755. /// search tree as if they were included in it due to leftover data from graph updates.
  756. /// - Fixed navmesh and recast graphs would unnecessarily be serialized by Unity which would slow down the inspector slightly.
  757. /// - Fixed AstarEnumFlagDrawer not working with private fields that used the [SerializeField] attribute.
  758. /// This does not impact anything that the A* Pathfinding Project used, but some users are using the AstarEnumFlagDrawer for
  759. /// other fields in their projects. Thanks Skalev for the patch.
  760. /// - Clicking 'Apply' in the Optimizations tab will now always refresh the UI instead of assuming that
  761. /// a recompilation will happen (it will not happen if only defines for other platforms than the current one were modified).
  762. /// - Fixed not being able to multi-edit RVOSquareObstacle components.
  763. /// - Fixed GridNode.ClearConnections(true) not removing all reversed connections and could sometimes remove the wrong ones.
  764. /// - Fixed TileHandlerHelper regularly checking for if an update needs to be done even if TileHandlerHelper.updateInterval was negative
  765. /// even though the documentation specifies that it should not do that (it only disabled updates when updateInterval = -1).
  766. /// - Fixed PathUtilities.GetPointsAroundPointWorld and PathUtilities.GetPointsAroundPoint returning incorrect results sometimes.
  767. /// - Fixed Path.immediateCallback not being reset to null when using path pooling.
  768. /// - TileHandlerHelper will now work even if Scan On Awake in A* Inspector -> Settings is false and you are scanning the graph later.
  769. /// - Fixed AstarWorkItem.init could be called multiple times.
  770. /// - Fixed some documentation typos.
  771. /// - Fixed colliders being included twice in the recast rasterization if the GameObject had a RecastMeshObj attached to it which effectively made RecastMeshObj not work well at all with colliders.
  772. /// - Fixed inspector for RecastMeshObj not updating if changes were done to the fields by a script or when an undo or redo was done.
  773. /// - Fixed SimpleSmoothModifier custom editor would sometimes set all instances of a field to the same value
  774. /// when editing multiple objects at the same time.
  775. /// - Fixed division by zero when the TimeScale was zero in the AstarDebugger class. Thanks Booil Jung for reporting the issue.
  776. /// - Various other small fixes in the AstarDebugger class.
  777. /// - Fixed division by zero when generating a recast graph and the cell size was much larger than the bounds of the graph.
  778. /// - Fixed the recast graph data structures could be invalid while a graph update was running in a separate thread.
  779. /// This could cause API calls like AstarPath.GetNearest to throw exceptions. Now the affected tiles are recalculated
  780. /// in a separate thread and then the updates are applied to the existing graph in the Unity thread.
  781. /// - Fixed some cases where the AlternativePath modifier would apply penalties incorrectly and possibly crash the pathfinding thread.
  782. /// - Fixed IAgent.NeighbourCount would sometimes not be reset to 0 when the agent was locked and thus takes into account no other agents.
  783. /// - Fixed RVO threads would sometimes not be terminated which could lead to memory leaks if switching scenes a lot.
  784. /// - Fixed GridGraph.GetNearest and NavGraph.GetNearest not handling constraint=null.
  785. /// - Internal changes
  786. /// - These are changes to the internals of the system and will most likely not have any significant externally visible effects.
  787. /// - Removed some wrapper methods for the heap in the PathHandler class since they were just unnecessary. Exposed the heap field as readonly instead.
  788. /// - Renamed BinaryHeapM to BinaryHeap.
  789. /// - Renamed ExtraMesh to RasterizationMesh.
  790. /// - Refactored TileHandler.CutPoly to reduce code messiness and also fixed some edge case bugs.
  791. /// - Documentation
  792. /// - Among other things: improved the writing-graph-generators (view in online documentation for working links) guide (among other things it no longer uses hard to understand calculations to get the index of each node).
  793. ///
  794. /// - 3.8.8.1 (2017-01-12)
  795. /// - Fixes
  796. /// - Fixed the 'Optimization' tab sometimes logging errors when clicking Apply on Unity 5.4 and higher.
  797. /// - More UWP fixes (pro version only).
  798. ///
  799. /// - 3.8.8 (2017-01-11)
  800. /// - Fixes
  801. /// - Fixed errors when deploying for the Universal Windows Platform (UWP).
  802. /// This includes the Hololens platform.
  803. /// - It is no longer necessary to use the compiler directive ASTAR_NO_ZIP when deploying for UWP.
  804. /// zipping will be handled by the System.IO.Compression.ZipArchive class on those platforms (ZipArchive is not available on other platforms).
  805. /// If you have previously enabled ASTAR_NO_ZIP it will stay enabled to ensure compatibility.
  806. /// - Changed some comments from the '/**<' format to '/**' since Monodevelop shows the wrong docs when using the '/**<' format.
  807. ///
  808. /// - 3.8.7 (2016-11-26)
  809. /// - Fixes
  810. /// - Improved compatibility with Unity 5.5 which was needed due to the newly introduced UnityEngine.Profiling namespace.
  811. ///
  812. /// - 3.8.6 (2016-10-31)
  813. /// - Upgrade Notes
  814. /// - Note that a few features and some fixes that have been available in the beta releases are not
  815. /// included in this version because they were either not ready to be released or depended on other
  816. /// changes that were not ready.
  817. /// - Dropped support for Unity 5.1.
  818. /// - Moved some things to inside the Pathfinding namespace to avoid naming collisions with other packages.
  819. /// Make sure you have the line 'using Pathfinding;' at the top of your scripts.
  820. /// - Seeker.StartMultiTargetPath will now also set the enabledTags and tagPenalties fields on the path.
  821. /// Similar to what StartPath has done. This has been the intended behaviour from the start, but bugs happen.
  822. /// See http://forum.arongranberg.com/t/multitargetpath-doesnt-support-tag-constraints/2561/3
  823. /// - The JsonFx library is no longer used, so the Pathfinding.JsonFx.dll file in the plugins folder
  824. /// may be removed to reduce the build size a bit. UnityPackages cannot delete files, so you have to delete it manually.
  825. /// - RecastGraph.UpdateArea (along with a few other functions) is now explicitly implemented for the IUpdatableGraph interface
  826. /// as it is usually a bad idea to try to call those methods directly (use AstarPath.UpdateGraphs instead).
  827. /// - AstarPath.FlushWorkItems previously had pretty bad default values for the optional parameters.
  828. /// By default it would not necessarily complete all work items, it would just complete those that
  829. /// took a single frame. This is pretty much never what you actually want so to avoid
  830. /// confusion the default value has been changed.
  831. /// - New Features and Improvements
  832. /// - The JsonFx library is no longer used. Instead a very tiny json serializer and deserializer has been written.
  833. /// In addition to reducing code size and being slightly faster, it also means that users using Windows Phone
  834. /// no longer have to use the ASTAR_NO_JSON compiler directive. I do not have access to a windows phone
  835. /// however, so I have not tested to build it for that platform. If any issues arise I would appreciate if
  836. /// you post them in the forum.
  837. /// - Improved inspector for NavmeshCut.
  838. /// - NodeLink2 can now be used even when using cached startup or when loading serialized data in other ways just as long as the NodeLink2 components are still in the scene.
  839. /// - LevelGridNode now has support for custom non-grid connections (just like GridNode has).
  840. /// - Added GridNode.XCoordinateInGrid and GridNode.ZCoordinateInGrid.
  841. /// - Improved documentation for GraphUpdateShape a bit.
  842. /// - Changes
  843. /// - Removed EditorUtilities.GetMd5Hash since it was not used anywhere.
  844. /// - Deprecated TileHandler.GetTileType and TileHandler.GetTileTypeCount.
  845. /// - Seeker.StartPath now properly handles MultiTargetPath objects as well.
  846. /// - Seeker.StartMultiTargetPath is now deprecated. Note that it will now also set the
  847. /// enabledTags and tagPenalties fields on the path. Similar to what StartPath has done.
  848. /// - Removed GridGraph.bounds since it was not used or set anywhere.
  849. /// - GraphNode.AddConnection will now throw an ArgumentNullException if you try to call it with a null target node.
  850. /// - Made PointGraph.AddChildren and PointGraph.CountChildren protected since it makes no sense for them to be called by other scripts.
  851. /// - Changed how the 'Save & Load' tab looks to make it easier to use.
  852. /// - Renamed 'Path Debug Mode' to 'Graph Coloring' and 'Path Log Mode' to 'Path Logging' in the inspector.
  853. /// - RecastGraph.UpdateArea (along with a few other functions) is now explicitly implemented for the IUpdatableGraph interface
  854. /// as it is usually a bad idea to try to call those methods directly (use AstarPath.UpdateGraphs instead).
  855. /// - Removed ConnectionType enum since it was not used anywhere.
  856. /// - Removed NodeDelegate and GetNextTargetDelegate since they were not used anywhere.
  857. /// - Fixes
  858. /// - Fixed TinyJson not using culture invariant float parsing and printing.
  859. /// This could cause deserialization errors on systems that formatted floats differently.
  860. /// - Fixed the EndingCondition example script.
  861. /// - Fixed speed being multiplied by Time.deltaTime in the AI script in the get started tutorial when it shouldn't have been.
  862. /// - Fixed FunnelModifier could for some very short paths return a straight line even though a corner should have been inserted.
  863. /// - Fixed typo. 'Descent' (as in 'Gradient Descent') was spelled as 'Decent' in some cases. Thanks Brad Grimm for finding the typo.
  864. /// - Fixed some documentation typos.
  865. /// - Fixed some edge cases in RandomPath and FleePath where a node outside the valid range of G scores could be picked in some cases (when it was not necessary to do so).
  866. /// - Fixed editor scripts in some cases changing the editor gui styles instead of copying them which could result in headers in unrelated places in the Unity UI had the wrong sizes. Thanks HP for reporting the bug.
  867. /// - Fixed NavmeshCut causing errors when cutting the navmesh if it was rotated upside down or scaled with a negative scale.
  868. /// - Fixed TriangleMeshNode.ClosestPointOnNodeXZ could sometimes return the wrong point (still on the node surface however).
  869. /// This could lead to characters (esp. when using the RichAI component) teleporting in rare cases. Thanks LordCecil for reporting the bug.
  870. /// - Fixed GridNodes not serializing custom connections.
  871. /// - Fixed nodes could potentially get incorrect graph indices assigned when additive loading was used.
  872. /// - Added proper error message when trying to call RecastGraph.ReplaceTile with a vertex count higher than the upper limit.
  873. /// - Known Bugs
  874. /// - Calling GetNearest when a recast graph is currently being updated on another thread may in some cases result in a null reference exception
  875. /// being thrown. This does not impact navmesh cutting. This bug has been present (but not discovered) in previous releases as well.
  876. /// - Calling GetNearest on point graphs with 'optimizeForSparseGraph' enabled may in some edge cases return the wrong node as being the closest one.
  877. /// It will not be widely off target though and the issue is pretty rare, so for real world use cases it should be fine.
  878. /// This bug has been present (but not discovered) in previous releases as well.
  879. ///
  880. /// - 3.8.3 through 3.8.5 were beta versions
  881. ///
  882. /// - 3.8.2 (2016-02-29)
  883. /// - Improvements
  884. /// - DynamicGridObstacle now handles rotation and scaling better.
  885. /// - Reduced allocations due to coroutines in DynamicGridObstacle.
  886. /// - Fixes
  887. /// - Fixed AstarPath.limitGraphUpdates not working properly most of the time.
  888. /// In order to keep the most common behaviour after the upgrade, the value of this field will be reset to false when upgrading.
  889. /// - Fixed DynamicGridObstacle not setting the correct bounds at start, so the first move of an object with the DynamicGridObstacle
  890. /// component could leave some nodes unwalkable even though they should not be. Thanks Dima for reporting the bug.
  891. /// - Fixed DynamicGridObstacle stopping to work after the GameObject it is attached to is deactivated and then activated again.
  892. /// - Fixed RVOController not working after reloading the scene due to the C# '??' operator not being equivalent to checking
  893. /// for '== null' (it doesn't use Unity's special comparison check). Thanks Khan-amil for reporting the bug.
  894. /// - Fixed typo in documentation for ProceduralGridMover.floodFill.
  895. /// - Changes
  896. /// - Renamed 'Max Update Frequency' to 'Max Update Interval' in the editor since it has the unit [second], not [1/second].
  897. /// - Renamed AstarPath.limitGraphUpdates to AstarPath.batchGraphUpdates and AstarPath.maxGraphUpdateFreq to AstarPath.graphUpdateBatchingInterval.
  898. /// Hopefully these new names are more descriptive. The documentation for the fields has also been improved slightly.
  899. ///
  900. /// - 3.8.1 (2016-02-17)
  901. /// - Improvements
  902. /// - The tag visualization mode for graphs can now use the custom list of colors
  903. /// that can be configured in the inspector.
  904. /// Thanks Arakade for the patch.
  905. /// - Fixes
  906. /// - Recast graphs now handle meshes and colliders with negative scales correctly.
  907. /// Thanks bvance and peted for reporting it.
  908. /// - Fixed GridGraphEditor throwing exceptions when a user had created a custom grid graph class
  909. /// which inherits from GridGraph.
  910. /// - Fixed Seeker.postProcessPath not being called properly.
  911. /// Instead it would throw an exception if the postProcessPath delegate was set to a non-null value.
  912. /// Thanks CodeSpeaker for finding the bug.
  913. ///
  914. /// - 3.8 (2016-02-16)
  915. /// - The last version released on the Unity Asset Store was 3.7, so if you are upgrading
  916. /// from that version check out the release notes for 3.7.1 through 3.7.5 as well.
  917. /// - Breaking Changes
  918. /// - For the few users that have written their own Path Modifiers. The 'source' parameter to the Apply method has been removed from the IPathModifier interface.
  919. /// You will need to remove that parameter from your modifiers as well.
  920. /// - Modifier priorities have been removed and the priorities are now set to sensible hard coded values since at least for the
  921. /// included modifiers there really is only one ordering that makes sense (hopefully there is no use case I have forgotten).
  922. /// This may affect your paths if you have used some other modifier order.
  923. /// Hopefully this change will reduce confusion for new users.
  924. /// - New Features and Improvements
  925. /// - Added NodeConnection mode to the StartEndModifier on the Seeker component.
  926. /// This mode will snap the start/end point to a point on the connections of the start/end node.
  927. /// Similar to the Interpolate mode, but more often does what you actually want.
  928. /// - SimpleSmoothModifier now has support for multi editing.
  929. /// - Added a new movement script called AILerp which uses linear interpolation to follow the path.
  930. /// This is good for games which want the agent to follow the path exactly and not use any
  931. /// physics like behaviour. This movement script works in both 2D and 3D.
  932. /// - Added a new 2D example scene which uses the new AILerp movement script.
  933. /// - All scripts now have a <a href="http://docs.unity3d.com/ScriptReference/HelpURLAttribute.html">HelpURLAttribute</a>
  934. /// so the documentation button at the top left corner of every script inspector now links directly to the documentation.
  935. /// - Recast graphs can now draw the surface of a navmesh in the scene view instead of only
  936. /// the node outlines. Enable it by checking the 'Show mesh surface' toggle in the inspector.
  937. /// Drawing the surface instead of the node outlines is usually faster since it does not use
  938. /// Unity Gizmos which have to rebuild the mesh every frame.
  939. /// - Improved GUI for the tag mask field on the Seeker.
  940. /// - All code is now consistently formatted, utilising the excellent Uncrustify tool.
  941. /// - Added animated gifs to the \link Pathfinding.RecastGraph.cellSize Recast graph \endlink documentation showing how some parameters change the resulting navmesh.
  942. /// If users like this, I will probably follow up and add similar gifs for variables in other classes.
  943. /// [Open online documentation to see images]
  944. /// - Fixes
  945. /// - Fixed objects in recast graphs being rasterized with an 0.5 voxel offset.
  946. /// Note that this will change how your navmesh is rasterized (but usually for the better), so you may want to make sure it still looks good.
  947. /// - Fixed graph updates to navmesh and recast graphs not checking against the y coordinate of the bounding box properly (introduced in 3.7.5).
  948. /// - Fixed potential bug when loading graphs from a file and one or more of the graphs were null.
  949. /// - Fixed invalid data being saved when calling AstarSerializer.SerializeGraphs with an array that was not equal to the AstarData.graphs array.
  950. /// The AstarSerializer is mostly used internally (and internally it is always called with the AstarData.graphs array). Thanks munkman for reporting this.
  951. /// - Fixed incorrect documentation for GridNode.NodeInGridIndex. Thanks mfjk for reporting it!
  952. /// - Fixed typo in a recast graph log message (where -> were). Thanks bigdaddio for reporting it!
  953. /// - Fixed not making sure the file is writable before writing graph cache files (Perforce could sometimes make it read-only). Thanks Jørgen Tjernø for the patch.
  954. /// - Fixed RVOController always using FindObjectOfType during Awake, causing performance issues in large scenes. Thanks Jørgen Tjernø for the patch.
  955. /// - Removed QuadtreeGraph, AstarParallel, NavMeshRenderer and NavmeshController from the released version.
  956. /// These were internal dev files but due to typos they had been included in the release.
  957. /// It will also automatically refresh itself if the graph has been rescanned with a different number of tiles.
  958. /// - Fixed SimpleSmoothModifier not always including the exact start point of the path.
  959. /// - Fixed ASTAR_GRID_NO_CUSTOM_CONNECTIONS being stripped out of the final build, so that entry in the Optimizations tab didn't actually do anything.
  960. /// - Fixed performance issue with path pooling. If many paths were being calculated and pooled, the performance could be
  961. /// severely reduced unless ASTAR_OPTIMIZE_POOLING was enabled (which it was not by default).
  962. /// - Fixed 3 compiler warnings about using some deprecated Unity methods.
  963. /// - Changes
  964. /// - Recast graphs' 'Snap To Scene' button now snaps to the whole scene instead of the objects that intersect the bounds that are already set.
  965. /// This has been a widely requested change. Thanks Jørgen Tjernø for the patch.
  966. /// - Moved various AstarMath functions to the new class VectorMath and renamed some of them to reduce confusion.
  967. /// - Removed various AstarMath functions because they were either not used or they already exist in e.g Mathf or System.Math.
  968. /// DistancePointSegment2, ComputeVertexHash, Hermite, MapToRange, FormatBytes,
  969. /// MagnitudeXZ, Repeat, Abs, Min, Max, Sign, Clamp, Clamp01, Lerp, RoundToInt.
  970. /// - PathEndingCondition (used with XPath) is now abstract since it doesn't really make any sense to use the default implementation (always returns true).
  971. /// - A 'Recyle' method is no longer required on path classes (reduced boilerplate).
  972. /// - Removed old IFunnelGraph interface since it was not used by anything.
  973. /// - Removed old ConvexMeshNode class since it was not used by anything.
  974. /// - Removed old script NavmeshController since it has been disabled since a few versions.
  975. /// - Removed Int3.DivBy2, Int3.unsafeSqrMagnitude and Int3.NormalizeTo since they were not used anywere.
  976. /// - Removed Int2.sqrMagnitude, Int2.Dot since they were not used anywhere and are prone to overflow (use sqrMagnitudeLong/DotLong instead)
  977. /// - Deprecated Int2.Rotate since it was not used anywhere.
  978. /// - Deprecated Int3.worldMagnitude since it was not used anywhere.
  979. ///
  980. /// - 3.7.5 (2015-10-05)
  981. /// - Breaking changes
  982. /// - Graph updates to navmesh and recast graphs now also check that the nodes are contained in the supplied bounding box on the Y axis.
  983. /// If the bounds you have been using were very short along the Y axis, you may have to change them so that they cover the nodes they should update.
  984. /// - Improvements
  985. /// - Added GridNode.ClosestPointOnNode.
  986. /// - Optimized GridGraph.CalculateConnections by approximately 20%.
  987. /// This means slightly faster scans and graph updates.
  988. /// - Changes
  989. /// - Graph updates to navmesh and recast graphs now also check that the nodes are contained in the supplied bounding box on the Y axis.
  990. /// If the bounds you have been using were very short along the Y axis, you may have to change them so that they cover the nodes they should update.
  991. /// - Fixes
  992. /// - Fixed stack overflow exception when a pivot root with no children was assigned in the heuristic optimization settings.
  993. /// - Fixed scanning in the editor could sometimes throw exceptions on new versions of Unity.
  994. /// Exceptions contained the message "Trying to initialize a node when it is not safe to initialize any node".
  995. /// This happened because Unity changed the EditorGUIUtility.DisplayProgressBar function to also call
  996. /// OnSceneGUI and OnDrawGizmos and that interfered with the scanning.
  997. /// - Fixed paths could be returned with invalid nodes if the path was calculated right
  998. /// before a call to AstarPath.Scan() was done. This could result in
  999. /// the funnel modifier becoming really confused and returning a straight line to the
  1000. /// target instead of avoiding obstacles.
  1001. /// - Fixed sometimes not being able to use the Optimizations tab on newer versions of Unity.
  1002. ///
  1003. /// - 3.7.4 (2015-09-13)
  1004. /// - Changes
  1005. /// - AIPath now uses the cached transform field in all cases for slightly better performance.
  1006. /// - Fixes
  1007. /// - Fixed recast/navmesh graphs could in rare cases think that a point on the navmesh was
  1008. /// in fact not on the navmesh which could cause odd paths and agents teleporting short distances.
  1009. /// - Documentation Fixes
  1010. /// - Fixed the Seeker class not appearing in the documentation due to a bug in Doxygen (documentation generator).
  1011. ///
  1012. /// - 3.7.3 (2015-08-18)
  1013. /// - Fixed GridGraph->Unwalkable When No Ground used the negated value (true meant false and false meant true).
  1014. /// This bug was introduced in 3.7 when some code was refactored. Thanks DrowningMonkeys for reporting it.
  1015. ///
  1016. /// - 3.7.2 (2015-08-06)
  1017. /// - Fixed penalties not working on navmesh based graphs (navmesh graphs and recast graphs) due to incorrectly configured compiler directives.
  1018. /// - Removed undocumented compiler directive ASTAR_CONSTANT_PENALTY and replaced with ASTAR_NO_TRAVERSAL_COST which
  1019. /// can strip out code handling penalties to get slightly better pathfinding performance (still not documented though as it is not really a big performance boost).
  1020. ///
  1021. /// - 3.7.1 (2015-08-01)
  1022. /// - Removed a few cases where exceptions where needed to better support WebGL when exception handling is disabled.
  1023. /// - Fixed MultiTargetPath could return the wrong path if the target of the path was the same as the start point.
  1024. /// - Fixed MultiTargetPath could sometimes throw exceptions when using more than one pathfinding thread.
  1025. /// - MultiTargetPath will now set path and vectorPath to the shortest path even if pathsForAll is true.
  1026. /// - The log output for MultiTargetPath now contains the length (in nodes) of the shortest path.
  1027. /// - Fixed RecastGraph throwing exceptions when trying to rasterize trees with missing (null) prefabs. Now they will simply be ignored.
  1028. /// - Removed RecastGraph.bbTree since it was not used for anything (bbTrees are stored inside each tile since a few versions)
  1029. /// - Improved performance of loading and updating large recast graph tiles (improved performance of internal AABB tree).
  1030. /// - Removed support for the compiler directive ASTAR_OLD_BBTREE.
  1031. ///
  1032. /// - 3.7 (2015-07-22)
  1033. /// - The last version that was released on the Unity Asset Store
  1034. /// was version 3.6 so if you are upgrading from that version also check out the release
  1035. /// notes for 3.6.1 through 3.6.7.
  1036. /// - Upgrade notes
  1037. /// - ProceduralGridMover.updateDistance is now in nodes instead of world units since this value
  1038. /// is a lot less world scale dependant. So the defaults should fit more cases.
  1039. /// You may have to adjust it slightly.
  1040. /// - Some old parts of the API that has been marked as deprecated long ago have been removed (see below).
  1041. /// Some other unused parts of the API that mostly lead to confusion have been removed as well.
  1042. /// - Improvements
  1043. /// - Rewrote several documentation pages to try to explain concepts better and fixed some old code.
  1044. /// - accessing-data (view in online documentation for working links)
  1045. /// - graph-updates (view in online documentation for working links)
  1046. /// - writing-graph-generators (view in online documentation for working links)
  1047. /// - Pathfinding.NavmeshCut
  1048. /// - And some other smaller changes.
  1049. /// - Added an overload of Pathfinding.PathUtilities.IsPathPossible which takes a tag mask.
  1050. /// - \link Pathfinding.XPath XPath \endlink now works again.
  1051. /// - The ProceduralGridMover component now supports rotated graphs (and all other ways you can transform it, e.g isometric angle and aspect ratio).
  1052. /// - Rewrote GridGraph.Linecast to be more accurate and more performant.
  1053. /// Previously it used a sampling approach which could cut corners of obstacles slightly and was pretty inefficient.
  1054. /// - Linted lots of files to remove trailing whitespace, fix imports, use 'var' when relevant and various other small tweaks.
  1055. /// - Added AstarData.layerGridGraph shortcut.
  1056. /// - Fixes
  1057. /// - Fixed compilation errors for Windows Store.
  1058. /// The errors mentioned ThreadPriority and VolatileRead.
  1059. /// - Fixed LayerGridGraph.GetNearest sometimes returning the wrong node inside a cell (e.g sometimes it would always return the node with the highest y coordinate).\n
  1060. /// This did not happen when the node size was close to 1 and the grid was positioned close to the origin.
  1061. /// Which it of course was in all my tests (tests are improved now).
  1062. /// - Fixed GridGraph.Linecast always returning false (no obstacles) when the start point and end point was the same.
  1063. /// Now it returns true (obstacle) if the start point was inside an obstacle which makes more sense.
  1064. /// - Linecasts on layered grid graphs now use the same implementation as the normal grid graph.\n
  1065. /// This fixed a TON of bugs. If you relied on the old (buggy) behaviour you might have to change your algorithms a bit.
  1066. /// It will now report more accurate hit information as well.
  1067. /// - Fixed documentation on LayerGridGraph.Linecast saying that it would return false if there was an obstacle in the way
  1068. /// when in fact exactly the opposite was true.
  1069. /// - Fixed inspector GUI throwing exceptions when two or more grid graphs or layered grid graphs were visible and thickRaycast was enabled on only one of them.
  1070. /// - Fixed a few options only relevant for grid graphs were visible in the layered grid graph inspector as well.
  1071. /// - Fixed GridGraph.CheckConnection returned the wrong result when neighbours was Four and dir was less than 4.
  1072. /// - All compiler directives in the Optimizations tab are now tested during the package build phase. So hopefully none of them should give compiler errors now.
  1073. /// - Improved accuracy of intellisense by changing the start of some documentation comments to /** instead of /**< as the later type is handled well by doxygen
  1074. /// but apparently not so well by MonoDevelop and VS.
  1075. /// - Fixed the editor sometimes incorrectly comparing versions which could cause the 'New Update' window to appear even though no new version was available.
  1076. /// - Changes
  1077. /// - Removed code only necessary for compatibility with Unity 4.5 and lower.
  1078. /// - Removed a lot of internal unused old code.
  1079. /// - Renamed GridGraph.GetNodePosition to GridGraph.GraphPointToWorld to avoid confusion.
  1080. /// - Renamed 3rd party plugin license files to prevent the Unity Asset Store
  1081. /// from detecting those as the license for the whole package.
  1082. /// - Changed Seeker.traversableTags to be a simple int instead of a class.
  1083. /// - GridNode and LevelGridNode now inherit from a shared base class called GridNodeBase.
  1084. /// - Removed support for the compiler directive ConfigureTagsAsMultiple since it was not supported by the whole codebase
  1085. /// and it was pretty old.
  1086. /// - Marked a few methods in AstarData as deprecated since they used strings instead of types.
  1087. /// If string to type conversion is needed it should be done elsewhere.
  1088. /// - Removed some methods which have been marked as obsolete for a very long time.
  1089. /// - AstarData.GetNode
  1090. /// - PathModifier and MonoModifier.ApplyOriginal
  1091. /// - Some old variants of PathModifier.Apply
  1092. /// - GridGeneratorEditor.ResourcesField
  1093. /// - Int3.safeMagnitude and safeSqrMagnitude
  1094. /// - GraphUpdateUtilities.IsPathPossible (this has been since long been moved to the PathUtilities class)
  1095. /// - All constructors on path classes. The static Construct method should be used instead since that can handle path pooling.
  1096. /// - GraphNode.Position, walkable, tags, graphIndex. These had small changes made to their names (if they use upper- or lowercase letters) a long time ago.
  1097. /// (for better or for worse, but I want to avoid changing the names now again to avoid breaking peoples' code)
  1098. /// - GridNode.GetIndex.
  1099. /// - Removed the Node class which has been marked as obsolete a very long time. This class has been renamed to GraphNode to avoid name conflicts.
  1100. /// - Removed LocalAvoidanceMover which has been marked as obsolete a very long time. The RVO system has replaced it.
  1101. /// - Removed Seeker.ModifierPass.PostProcessOriginal since it was not used. This also caused Seeker.postProcessOriginalPath to be removed.
  1102. /// - Removed support for ASTAR_MORE_PATH_IDS because it wasn't really useful, it only increased the memory usage.
  1103. /// - Removed Path.height, radius, turnRadius, walkabilityMask and speed since they were dummy variables that have not been used and are
  1104. /// better implemented using inheritance anyway. This is also done to reduce confusion for users.
  1105. /// - Removed the old local avoidance system which has long since been marked as obsolete and replaced by the RVO based system.
  1106. ///
  1107. /// - 3.6.7 (2015-06-08)
  1108. /// - Fixes
  1109. /// - Fixed a race condition when OnPathPreSearch and OnPathPostSearch were called.
  1110. /// When the AlternativePath modifier was used, this could cause the pathfinding threads to crash with a null reference exception.
  1111. ///
  1112. /// - 3.6.6 (2015-05-27)
  1113. /// - Improvements
  1114. /// - Point Graphs are now supported when using ASTAR_NO_JSON.
  1115. /// - The Optimizations tab now modifies the player settings instead of changing the source files.
  1116. /// This is more stable and your settings are now preserved even when you upgrade the system.
  1117. /// - The Optimizations tab now works regardless of the directory you have installed the package in.
  1118. /// Hopefully the whole project is now directory agnostic, but you never know.
  1119. /// - Changes
  1120. /// - Switched out OnVoidDelegate for System.Action.
  1121. /// You might get a compiler error because of this (for the few that use it)
  1122. /// but then just rename your delegate to System.Action.
  1123. /// - Fixes
  1124. /// - Fixed recast graphs not saving all fields when using ASTAR_NO_JSON.
  1125. ///
  1126. /// - 3.6.5 (2015-05-19)
  1127. /// - Fixes
  1128. /// - Fixed recast graphs generating odd navmeshes on non-square terrains.
  1129. /// - Fixed serialization sometimes failing with the error 'Argument cannot be null' when ASTAR_NO_JSON was enabled.
  1130. /// - The 'Walkable Climb' setting on recast graphs is now clamped to be at most equal to 'Walkable Height' because
  1131. /// otherwise the navmesh generation can fail in some rare cases.
  1132. /// - Changes
  1133. /// - Recast graphs now show unwalkable nodes with a red outline instead of their normal colors.
  1134. ///
  1135. /// - 3.6.4 (2015-04-19)
  1136. /// - Fixes
  1137. /// - Improved compatibility with WIIU and other big-endian platforms.
  1138. ///
  1139. /// - 3.6.3 (2015-04-19)
  1140. /// - Fixes
  1141. /// - Fixed RVONavmesh not adding obstacles correctly (they were added added, but all agents ignored them).
  1142. ///
  1143. /// - 3.6.2 (2015-04-14)
  1144. /// - Fixes
  1145. /// - Fixed null reference exception in the PointGraph OnDrawGizmos method.
  1146. /// - Fixed a few example scene errors in Unity 5.
  1147. ///
  1148. /// - 3.6.1 (2015-04-06)
  1149. /// - Upgrade notes:
  1150. /// - The behaviour of NavGraph.RelocateNodes has changed.
  1151. /// The oldMatrix was previously treated as the newMatrix and vice versa so you might
  1152. /// need to switch the order of your parameters if you are calling it.
  1153. /// - Highlights:
  1154. /// - Works in WebGL/IL2CPP (Unity 5.0.0p3).
  1155. /// At least according to my limited tests.
  1156. /// - Implemented RelocateNodes for recast graphs (however it cannot be used on tiled recast graphs).
  1157. /// - Added support for hexagon graphs.
  1158. /// Enable it by changing the 'Connections' field on a grid graph to 'Six'.
  1159. /// - Fixed AstarData.DeserializeGraphsAdditive (thanks tmcsweeney).
  1160. /// - Fixed pathfinding threads sometimes not terminating correctly.
  1161. /// This would show up as a 'Could not terminate pathfinding thread...' error message.
  1162. /// - Added a version of GridGraph.RelocateNodes which takes grid settings instead of a matrix for ease of use.
  1163. /// - Changes:
  1164. /// - Removed NavGraph.SafeOnDestroy
  1165. /// - Removed GridGraph.scans because it is a pretty useless variable.
  1166. /// - Removed NavGraph.CreateNodes (and overriden methods) since they were not used.
  1167. /// - Made GridGraph.RemoveGridGraphFromStatic private.
  1168. /// - Removed NavMeshGraph.DeserializeMeshNodes since it was not used.
  1169. /// - Made Seeker.lastCompletedVectorPath, lastCompletedNodePath, OnPathComplete, OnMultiPathComplete, OnPartialPathComplete
  1170. /// private since they really shouldn't be used by other scripts.
  1171. /// - Removed Seeker.saveGetNearestHints, Seeker.startHint, Seeker.endHint, Seeker.DelayPathStart since they were not used.
  1172. /// - Removed unused methods of little use: AstarData.GuidToIndex and AstarData.GuidToGraph.
  1173. /// - Removed RecastGraph.vertices and RecastGraph.vectorVertices since they were obsolete and not used.
  1174. /// - Removed some old Unity 4.3 and Unity 3 compatibility code.
  1175. /// - Recast graphs' 'Snap to scene' button now takes into account the layer mask and the tag mask when snapping, it now also checks terrains and colliders instead of just meshes (thanks Kieran).
  1176. /// - Fixes:
  1177. /// - Fixed RecastGraph bounds gizmos could sometimes be drawn with the wrong color.
  1178. /// - Fixed a rare data race which would cause an exception with the message
  1179. /// 'Trying to initialize a node when it is not safe to initialize any nodes' to be thrown
  1180. /// - Tweaked Undo behaviour, should be more stable now.
  1181. /// - Fixed grid graph editor changing the center field very little every frame (floating point errors)
  1182. /// causing an excessive amount of undo items to be created.
  1183. /// - Reduced unecessary dirtying of the scene (thanks Ben Hymers).
  1184. /// - Fixed RVOCoreSimulator.WallThickness (thanks tmcsweeney).
  1185. /// - Fixed recast graph not properly checking for the case where an object had a MeshFilter but no Renderer (thanks 3rinJax).
  1186. /// - Fixed disabling ASTAR_RECAST_ARRAY_BASED_LINKED_LIST (now ASTAR_RECAST_CLASS_BASED_LINKED_LIST) would cause compiler errors.
  1187. /// - Fixed recast graphs could sometimes voxelize the world incorrectly and the resulting navmesh would have artifacts.
  1188. /// - Fixed graphMask code having been removed from the free version in some cases
  1189. /// due to old code which treated it as a pro only feature.
  1190. /// - Improved compatibility with Xbox One.
  1191. /// - Fixed RVOController layer field not working when multiple agents were selected.
  1192. /// - Fixed grid nodes not being able to have custom connections in the free version.
  1193. /// - Fixed runtime error on PS4.
  1194. ///
  1195. /// - 3.6 (2015-02-02)
  1196. /// - Upgrade notes:
  1197. /// - Cache data for faster startup is now stored in a separate file.\n
  1198. /// This reduces the huge lag some users have been experiencing since Unity changed their Undo system.\n
  1199. /// You will need to open the AstarPath components which used cached startup, go to the save and load tab
  1200. /// and press a button labeled "Transfer cache data to a separate file".
  1201. /// - Highlights:
  1202. /// - Added support for the Jump Point Search algorithm on grid graphs (pro only).\n
  1203. /// The JPS algorithm can be used to speed up pathfinding on grid graphs *without any penalties or tag weights applied* (it only works on uniformly weighted graphs).
  1204. /// It can be several times faster than normal A*.
  1205. /// It works best on open areas.
  1206. /// - Added support for heuristic optimizations (pro only).\n
  1207. /// This can be applied on any static graph, i.e any graph which does not change.
  1208. /// It requires a rather slow preprocessing step so graph updates will be really slow when using this.
  1209. /// However when the preprocessing is done, it can speed up pathfinding with an order of magnitude.
  1210. /// It works especially well in mazes with lots of options and dead ends.\n
  1211. /// Combined with JPS (mentioned above) I have seen it perform up to 20x better than regular A* with no heuristic optimizations.
  1212. /// - Added PointNode.gameObject which will contain the GameObject each node was created from.
  1213. /// - Added support for RVO obstacles.\n
  1214. /// It is by no means perfect at this point, but at least it works.
  1215. /// - Undo works reasonably well again.\n
  1216. /// It took a lot of time working around weird Unity behaviours.
  1217. /// For example Unity seems to send undo events when dragging items to object fields (why? no idea).
  1218. /// - Dragging meshes to the NavmeshGraph.SourceMesh field works again.\n
  1219. /// See fix about undo above.
  1220. /// - Extended the max number of possible areas (connected components) to 2^17 = 131072 up from 2^10 = 1024.\n
  1221. /// No memory usage increase, just shuffling bits around.\n
  1222. /// Deprecated compiler directive ASTAR_MORE_AREAS
  1223. /// - Extended the max number of graphs in the inspector to 256 up from 4 or 32 depending on settings.\n
  1224. /// No memory usage increase, just shuffling bits around.
  1225. /// I still don't recommend that you actually use this many graphs.
  1226. /// - Added RecastTileUpdate and RecastTileUpdateHandler scripts for easier recast tile updating with good performance.
  1227. /// - When using A* Inspector -> Settings -> Debug -> Path Debug Mode = {G,F,H,Penalties}
  1228. /// you previously had to set the limits for what should be displayed as "red" in the scene view yourself, this is now
  1229. /// optionally automatically calculated. The UI for it has also been improved.
  1230. /// - Improvements:
  1231. /// - Added penaltyAnglePower to Grid Graph -> Extra -> Penalty from Angle.\n
  1232. /// This can be used to increase the penalty even more for large angles than for small angles (more than it already does, that is).
  1233. /// - ASTAR_NO_JSON now works for recast graphs as well.
  1234. /// - Added custom inspector for RecastMeshObj, hopefully it will not be as confusing anymore.
  1235. /// - Changes:
  1236. /// - FleePath now has a default flee strength of 1 to avoid confusion when the FleePath doesn't seem to flee from anything.
  1237. /// - Removed some irrelevant defines from the Optimizations tab.
  1238. /// - IAgent.Position cannot be changed anymore, instead use the Teleport and SetYPosition methods.
  1239. /// - Exposed GraphUpdateObject.changedNodes.
  1240. /// - Deprecated the threadSafe paremeter on RegisterSafeUpdate, it is always treated as true now.
  1241. /// - The default value for AstarPath.minAreaSize is now 0 since the number of areas (connected component) indices has been greatly increased (see highlights).
  1242. /// - Tweaked ProceduralWorld script (used for the "Procedural" example scene) to reduce FPS drops.
  1243. /// - Fixes:
  1244. /// - AstarPath.FlushGraphUpdates will now complete all graph updates instead of just making sure they have started.\n
  1245. /// In addition to avoiding confusion, this fixes a rare null reference exception which could happen when using
  1246. /// the GraphUpdateUtilities.UpdateGraphsNoBlock method.
  1247. /// - Fixed some cases where updating recast graphs could throw exceptions. (message begun with "No Voxelizer object. UpdateAreaInit...")
  1248. /// - Fixed typo in RVOSimulator. desiredSimulatonFPS -> desiredSimulationFPS.
  1249. /// - RVO agents move smoother now (previously their velocity could change widely depending on the fps, the average velocity was correct however)
  1250. /// - Fixed an exception which could, with some graph settings, be thrown when deserializing on iPhone when bytecode stripping was enabled.
  1251. /// - Fixed a NullReferenceException in MultiTargetPath which was thrown if the path debug mode was set to "Heavy".
  1252. /// - Fixed PathUtilies.BFS always returning zero nodes (thanks Ajveach).
  1253. /// - Made reverting GraphUpdateObjects work. The GraphUpdateUtilities.UpdateGraphsNoBlock was also fixed by this change.
  1254. /// - Fixed compile error with monodevelop.
  1255. /// - Fixed a bug which caused scanning to fail if more than one NavmeshGraph existed.
  1256. /// - Fixed the lightweight local avoidance example scene which didn't work previously.
  1257. /// - Fixed SimpleSmoothModifier not exposing Roundness Factor in the editor for the Curved Nonuniform mode.
  1258. /// - Fixed an exception when updating RecastGraphs and using RelevantGraphSurfaces and multithreading.
  1259. /// - Fixed exceptions caused by starting paths from other threads than the Unity thread.
  1260. /// - Fixed an infinite loop/out of memory exception that could occur sometimes when graph updates were being done at the start of the game (I hate multithreading race conditions).
  1261. /// - Fixed the Optimizations tab not working when JS Support was enabled.
  1262. /// - Fixed graph updating not working on navmesh graphs (it was broken before due to a missing line of code).
  1263. /// - Fixed some misspelled words in the documentation.
  1264. /// - Removed some unused and/or redundant variables.
  1265. /// - Fixed a case where graphs added using code might not always be configured correctly (and would throw exceptions when scanning).
  1266. /// - Improved Windows Store compatibility.
  1267. /// - Fixed a typo in the GridGraph which could cause compilation to fail when building for Windows Phone or Windows Store (thanks MariuszP)
  1268. /// - Lots of code cleanups and comments added to various scripts.
  1269. /// - Fixed some cases where MonoDevelop would pick up the wrong documention for fields since it doesn't support all features that Doxygen supports.
  1270. /// - Fixed a bug which caused the points field on GraphUpdateScene to sometimes not be editable.
  1271. /// - Fixed a bug which could cause RVO agents not to move if the fps was low and Interpolation and Double Buffering was used.
  1272. /// - Set the execution order for RVOController and RVOSimulator to make sure that other scripts will
  1273. /// get the latest position in their Update method.
  1274. /// - Fixed a bug which could cause some nearest point on line methods in AstarMath to return NaN.
  1275. /// This could happen when Seeker->Start End Modifier->StartPoint and EndPoint was set to Interpolate.
  1276. /// - Fixed a runtime error on PS Vita.
  1277. /// - Fixed an index out of range exception which could occur when scanning LayeredGridGraphs.
  1278. /// - Fixed an index out of range exception which could occur when drawing gizmos for a LayeredGridGraph.
  1279. /// - Fixed a bug which could cause ProduralGridMover to update the graph every frame regardless
  1280. /// of if the target moved or not (thanks Makak for finding the bug).
  1281. /// - Fixed a number of warnings in Unity 5.
  1282. ///
  1283. /// - 3.5.9.7 (3.6 beta 6, 2015-01-28)
  1284. /// - 3.5.9.6 (3.6 beta 5, 2015-01-28)
  1285. /// - 3.5.9.5 (3.6 beta 4, 2015-01-27)
  1286. /// - 3.5.9.1 (3.6 beta 3, 2014-10-14)
  1287. /// - 3.5.9 (3.6 beta 2, 2014-10-13)
  1288. /// - 3.5.8 (3.6 beta 1)
  1289. /// - See release notes for 3.6
  1290. ///
  1291. /// - 3.5.2 (2013-09-01) (tiny bugfix and small feature release)
  1292. /// - Added isometric angle option for grid graphs to help with isometric 2D games.
  1293. /// - Fixed a bug with the RVOAgent class which caused the LightweightRVO example scene to not work as intended (no agents were avoiding each other).
  1294. /// - Fixed some documentation typos.
  1295. /// - Fixed some compilations errors some people were having with other compilers than Unity's.
  1296. ///
  1297. /// - 3.5.1 (2014-06-15)
  1298. /// - Added avoidance masks to local avoidance.
  1299. /// Each agent now has a layer and each agent can specify which layers it will avoid.
  1300. ///
  1301. /// - 3.5 (2014-06-12)
  1302. /// - Added back local avoidance!!
  1303. /// The new system uses a sampling based algorithm instead of a geometric one.
  1304. /// The API is almost exactly the same so if you used the previous system this will be a drop in replacement.
  1305. /// As for performance, it is roughly the same, maybe slightly worse in high density situations and slightly better
  1306. /// in less dense situations. It can handle several thousand agents on an i7 processor.
  1307. /// Obstacles are not yet supported, but they will be added in a future update.
  1308. ///
  1309. /// - Binary heap switched out for a 4-ary heap.
  1310. /// This improves pathfinding performances by about 5%.
  1311. /// - Optimized scanning of navmesh graphs (not the recast graphs)
  1312. /// Large meshes should be much faster to scan now.
  1313. /// - Optimized BBTree (nearest node lookup for navmesh/recast graphs, pro version only)
  1314. /// Nearest node queries on navmesh/recast graphs should be slightly faster now.
  1315. /// - Minor updates to the documentation, esp. to the GraphNode class.
  1316. ///
  1317. /// - 3.4.0.7
  1318. /// - Vuforia test build
  1319. ///
  1320. /// - 3.4.0.6
  1321. /// - Fixed an issue where serialization could on some machines sometimes cause an exception to get thrown.
  1322. /// - Fixed an issue where the recast graph would not rasterize terrains properly near the edges of it.
  1323. /// - Added PathUtilities.BFS.
  1324. /// - Added PathUtilities.GetPointsAroundPointWorld.
  1325. ///
  1326. /// - 3.4.0.5
  1327. /// - Added offline documentation (Documentation.zip)
  1328. /// - Misc fixes for namespace conflicts people have been having. This should improve compatibility with other packages.
  1329. /// You might need to delete the AstarPathfindingProject folder and reimport the package for everything to work.
  1330. ///
  1331. /// - 3.4.0.4
  1332. /// - Removed RVOSimulatorEditor from the free version, it was causing compiler errors.
  1333. /// - Made PointGraph.nodes public.
  1334. ///
  1335. /// - 3.4.0.3
  1336. /// - Removed Local Avoidance due to licensing issues.
  1337. /// Agents will fall back to not avoiding each other.
  1338. /// I am working to get the local avoidance back as soon as possible.
  1339. ///
  1340. /// - 3.4.0.2
  1341. /// - Unity Asset Store forced me to increase version number.
  1342. ///
  1343. /// - 3.4.0.1
  1344. /// - Fixed an ArrayIndexOutOfBounds exception which could be thrown by the ProceduralGridMover script in the Procedural example scene if the target was moved too quickly.
  1345. /// - The project no longer references assets from the Standard Assets folder (the package on the Unity Asset Store did so by mistake before).
  1346. ///
  1347. /// - 3.4
  1348. /// - Fixed a null reference exception when scanning recast graphs and rasterizing colliders.
  1349. /// - Removed duplicate clipper_library.dll which was causing compiler errors.
  1350. /// - Support for 2D Physics collision testing when using Grid Graphs.
  1351. /// - Better warnings when using odd settings for Grid Graphs.
  1352. /// - Minor cleanups.
  1353. /// - Queued graph updates are no longer being performed when the AstarPath object is destroyed, this just took time.
  1354. /// - Fixed a bug introduced in 3.3.11 which forced grid graphs to be square in Unity versions earlier than 4.3.
  1355. /// - Fixed a null reference in BBTree ( used by RecastGraph).
  1356. /// - Fixed NavmeshGraph not rebuilding BBTree on cached start (causing performance issues on larger graphs).
  1357. ///
  1358. /// - Includes all changes from the beta releases below
  1359. ///
  1360. /// - Beta 3.3.14 ( available for everyone! )
  1361. /// - All dlls are now in namespaces (e.g Pathfinding.Ionic.Zip instead of just Ionic.Zip ) to avoid conflicts with other packages.
  1362. /// - Most scripts are now in namespaces to avoid conflicts with other packages.
  1363. /// - GridNodes now support custom connections.
  1364. /// - Cleanups, preparing for release.
  1365. /// - Reverted to using an Int3 for GraphNode.position instead of an abstract Position property, the tiny memory gains were not worth it.
  1366. ///
  1367. /// - Beta 3.3.13 ( 4.3 compatible only )
  1368. /// - Fixed an issue where deleting a NavmeshCut component would not update the underlaying graph.
  1369. /// - Better update checking.
  1370. ///
  1371. /// - Beta 3.3.12 ( 4.3 compatible only )
  1372. /// - Fixed an infinite loop which could happen when scanning graphs during runtime ( not the first scan ).
  1373. /// - NodeLink component is now working correctly.
  1374. /// - Added options for optimizations to the PointGraph.
  1375. /// - Improved TileHandler and navmesh cutting.
  1376. /// - Fixed rare bug which could mess up navmeshes when using navmesh cutting.
  1377. ///
  1378. /// - Beta 3.3.11 ( 4.3 compatible only )
  1379. /// - Fixed update checking. A bug has caused update checking not to run unless you had been running a previous version in which the bug did not exist.
  1380. /// I am not sure how long this bug has been here, but potentially for a very long time.
  1381. /// - Added an update notification window which pops up when there is a new version of the A* Pathfinding Project.
  1382. /// - Lots of UI fixes for Unity 4.3
  1383. /// - Lots of other UI fixes and imprements.
  1384. /// - Fixed gravity for RichAI.
  1385. /// - Fixed Undo for Unity 4.3
  1386. /// - Added a new example scene showing a procedural environment.
  1387. ///
  1388. /// - Beta 3.3.10
  1389. /// - Removed RecastGraph.includeOutOfBounds.
  1390. /// - Fixed a few bugs when updating Layered Grid Graphs causing incorrect connections to be created, and valid ones to be left out.
  1391. /// - Fixed a null reference bug when removing RVO agents.
  1392. /// - Fixed memory leaks when deserializing graphs or reloading scenes.
  1393. ///
  1394. /// - Beta 3.3.9
  1395. /// - Added new tutorial page about recast graphs.
  1396. /// - Recast Graph: Fixed a bug which could cause vertical surfaces to be ignored.
  1397. /// - Removed support for C++ Recast.
  1398. /// - Fixed rare bug which could mess up navmeshes when using navmesh cutting.
  1399. /// - Improved TileHandler and navmesh cutting.
  1400. /// - GraphModifiers now take O(n) (linear) time to destroy at end of game instead of O(n^2) (quadratic).
  1401. /// - RecastGraph now has a toggle for using tiles or not.
  1402. /// - Added RelevantGraphSurface which can be used with RecastGraphs to prune away non-relevant surfaces.
  1403. /// - Removed RecastGraph.accurateNearestNode since it was not used anymore.
  1404. /// - Added RecastGraph.nearestSearchOnlyXZ.
  1405. /// - RecastGraph now has support for removing small areas.
  1406. /// - Added toggle to show or hide connections between nodes on a recast graph.
  1407. /// - PointNode has some graph searching methods overloaded specially. This increases performance and reduces alloacations when searching
  1408. /// point graphs.
  1409. /// - Reduced allocations when searching on RecastGraph.
  1410. /// - Reduced allocations in RichAI and RichPath. Everything is pooled now, so for most requests no allocations will be done.
  1411. /// - Reduced allocations in general by using "yield return null" instead of "yield return 0"
  1412. /// - Fixed teleport for local avoidance agents. Previously moving an agent from one position to another
  1413. /// could cause it to interpolate between those two positions for a brief amount of time instead of staying at the second position.
  1414. ///
  1415. /// - Beta 3.3.8
  1416. /// - Nicer RichAI gizmo colors.
  1417. /// - Fixed RichAI not using raycast when no path has been calculated.
  1418. ///
  1419. /// - Beta 3.3.7
  1420. /// - Fixed stack overflow exception in RichPath
  1421. /// - Fixed RichPath could sometimes generate invalid paths
  1422. /// - Added gizmos to RichAI
  1423. ///
  1424. /// - Beta 3.3.6
  1425. /// - Fixed node positions being off by half a node size. GetNearest node queries on grid graphs would be slightly inexact.
  1426. /// - Fixed grid graph updating could get messed up when using erosion.
  1427. /// - ... among other things, see below
  1428. ///
  1429. /// - Beta 3.3.5 and 3.3.6
  1430. /// - Highlights
  1431. /// - Rewritten graph nodes. Nodes can now be created more easily (less overhead when creating nodes).
  1432. /// - Graphs may use their custom optimized memory structure for storing nodes.
  1433. /// - Performance improvements for scanning recast graphs.
  1434. /// - Added a whole new AI script. RichAI (and the class RichPath for some things):
  1435. /// This script is intended for navmesh based graphs and has features such as:
  1436. /// - Guarantees that the character stays on the navmesh
  1437. /// - Minor deviations from the path can be fixed without a path recalculation.
  1438. /// - Very exact stop at endpoint (seriously, precision with something like 7 decimals).
  1439. /// No more circling around the target point as with AIPath.
  1440. /// - Does not use path modifiers at all (for good reasons). It has an internal funnel modifier however.
  1441. /// - Simple wall avoidance to avoid too much wall hugging.
  1442. /// - Basic support for off-mesh links (see example scene).
  1443. /// - Improved randomness for RandomPath and FleePath, all nodes considered now have an equal chance of being selected.
  1444. /// - Recast now has support for tiles. This enabled much larger worlds to be rasterized (without OutOfMemory errors) and allows for dynamic graph updates. Still slow, but much faster than
  1445. /// a complete recalculation of the graph.
  1446. /// - Navmesh Cutting can now be done on recast graphs. This is a kind of (relatively) cheap graph updating which punches a hole in the navmesh to make place for obstacles.
  1447. /// So it only supports removing geometry, not adding it (like bridges). This update is comparitively fast, and it makes real time navmesh updating possible.
  1448. /// See video: http://youtu.be/qXi5qhhGNIw.
  1449. /// - Added RecastMeshObj which can be attached to any GameObject to include that object in recast rasterization. It exposes more options and is also
  1450. /// faster for graph updates with logarithmic lookup complexity instead of linear (good for larger worlds when doing graph updating).
  1451. /// - Reintroducing special connection costs for start and end nodes.
  1452. /// Before multithreading was introduced, pathfinding on navmesh graphs could recalculate
  1453. /// the connection costs for the start and end nodes to take into account that the start point is not actually exactly at the start node's position
  1454. /// (triangles are usually quite a larger than the player/npc/whatever).
  1455. /// This didn't work with multithreading however and could mess up pathfinding, so it was removed.
  1456. /// Now it has been reintroduced, working with multithreading! This means more accurate paths
  1457. /// on navmeshes.
  1458. /// - Added several methods to pick random points (e.g for group movement) to Pathfinding.PathUtlitilies.
  1459. /// - Added RadiusModifier. A new modifier which can offset the path based on the character radius. Intended for navmesh graphs
  1460. /// which are not shrinked by the character radius at start but can be used for other purposes as well.
  1461. /// - Improved GraphUpdateScene gizmos. Convex gizmos are now correctly placed. It also shows a bounding box when selected (not showing this has confused a lot of people).
  1462. /// - AIPath has gotten some cleanups. Among other things it now behaves correctly when disabled and then enabled again
  1463. /// making it easy to pool and reuse (should that need arise).
  1464. /// - Funnel modifier on grid graphs will create wider funnels for diagonals which results in nicer paths.
  1465. /// - If an exception is thrown during pathfinding, the program does no longer hang at quit.
  1466. /// - Split Automatic thread count into Automatic High Load and Automatic Low Load. The former one using a higher number of thread.
  1467. /// - Thread count used is now shown in the editor.
  1468. /// - GridGraph now supports ClosestOnNode (StartEndModifier) properly. SnapToNode gives the previous behaviour on GridGraphs (they were identical before).
  1469. /// - New example scene Door2 which uses the NavmeshCut component.
  1470. /// - Fixes
  1471. /// - Fixed spelling error in GridGraph.uniformWidthDepthGrid.
  1472. /// - Erosion radius (character radius, recast graphs) could become half of what it really should be in many cases.
  1473. /// - RecastGraph will not rasterize triggers.
  1474. /// - Fixed recast not being able to handle multiple terrains.
  1475. /// - Fixed recast generating an incorrect mesh for terrains in some cases (not the whole terrain was included).
  1476. /// - Linecast on many graph types had incorrect descriptions saying that the function returns true when the line does not intersect any obstacles,
  1477. /// it is actually the other way around. Descriptions corrected.
  1478. /// - The list of nodes returned by a ConstantPath is now guaranteed to have no duplicates.
  1479. /// - Many recast constants are now proper constants instead of static variables.
  1480. /// - Fixed bug in GridNode.RemoveGridGraph which caused graphs not being cleaned up correctly. Could cause problems later on.
  1481. /// - Fixed an ArgumentOutOfRange exception in ListPool class.
  1482. /// - RelocateNodes on NavMeshGraph now correctly recalculates connection costs and rebuilds the internal query tree (thanks peted on the forums).
  1483. /// - Much better member documentation for RVOController.
  1484. /// - Exposed MaxNeighbours from IAgent to RVOController.
  1485. /// - Fixed AstarData.UpdateShortcuts not being called when caching was enabled. This caused graph shortcuts such as AstarPath.astarData.gridGraph not being set
  1486. /// when loaded from a cache.
  1487. /// - RVOCoreSimulator/RVOSimulator now cleans up the worker threads correctly.
  1488. /// - Tiled recast graphs can now be serialized.
  1489. /// - Changes
  1490. /// - Renamed Modifier class to PathModifier to avoid naming conflicts with user scripts and other packages.
  1491. /// - Cleaned up recast, put inside namespace and split into multiple files.
  1492. /// - ListPool and friends are now threadsafe.
  1493. /// - Removed Polygon.Dot since the Vector3 class already contains such a method.
  1494. /// - The Scan functions now use callbacks for progress info instead of IEnumerators. Graphs can now output progress info as well.
  1495. /// - Added Pathfinding.NavGraph.CountNodes function.
  1496. /// - Removed GraphHitInfo.success field since it was not used.
  1497. /// - GraphUpdateScene will now fall back to collider.bounds or renderer.bounds (depending on what is available) if no points are
  1498. /// defined for the shape.
  1499. /// - AstarPath.StartPath now has an option to put the path in the front of the queue to prioritize its calculation over other paths.
  1500. /// - Time.fixedDeltaTime by Time.deltaTime in AIPath.RotateTowards() to work with both FixedUpdate and Update. (Thanks Pat_AfterMoon)
  1501. /// You might have to configure the turn speed variable after updating since the actual rotation speed might have changed a bit depending on your settings.
  1502. /// - Fixed maxNeighbourDistance not being used correctly by the RVOController script. It would stay at the default value. If you
  1503. /// have had trouble getting local avoidance working on world with a large scale, this could have been the problem. (Thanks to Edgar Sun for providing a reproducible example case)
  1504. /// - Graphs loaded using DeserializeGraphsAdditive will get their graphIndex variables on the nodes set to the correct values. (thanks peted for noticing the bug).
  1505. /// - Fixed a null reference exception in MultiTargetPath (thanks Dave for informing me about the bug).
  1506. /// - GraphUpdateScene.useWorldSpace is now false per default.
  1507. /// - If no log output is disabled and we are not running in the editor, log output will be discarded as early as possible for performance.
  1508. /// Even though in theory log output could be enabled between writing to internal log strings and deciding if log output should be written.
  1509. /// - NavGraph.inverseMatrix is now a field, not a property (for performance). All writes to matrix should be through the SetMatrix method.
  1510. /// - StartEndModifier now uses ClosestOnNode for both startPoint and endPoint by default.
  1511. /// - Known bugs
  1512. /// - Linecasting on graphs is broken at the moment. (working for recast/navmesh graph atm. Except in very special cases)
  1513. /// - RVONavmesh does not work with tiled recast graphs.
  1514. ///
  1515. /// - 3.2.5.1
  1516. /// - Fixes
  1517. /// - Pooling of paths had been accidentally disabled in AIPath.
  1518. ///
  1519. /// - 3.2.5
  1520. /// - Changes
  1521. /// - Added support for serializing dictionaries with integer keys via a Json Converter.
  1522. /// - If drawGizmos is disabled on the seeker, paths will be recycled instantly.
  1523. /// This will show up so that if you had a seeker with drawGizmos=false, and then enable
  1524. /// drawGizmos, it will not draw gizmos until the next path request is issued.
  1525. /// - Fixes
  1526. /// - Fixed UNITY_4_0 preprocesor directives which were indented for UNITY 4 and not only 4.0.
  1527. /// Now they will be enabled for all 4.x versions of unity instead of only 4.0.
  1528. /// - Fixed a path pool leak in the Seeker which could cause paths not to be released if a seeker
  1529. /// was destroyed.
  1530. /// - When using a non-positive maxDistance for point graphs less processing power will be used.
  1531. /// - Removed unused 'recyclePaths' variable in the AIPath class.
  1532. /// - NullReferenceException could occur if the Pathfinding.Node.connections array was null.
  1533. /// - Fixed NullReferenceException which could occur sometimes when using a MultiTargetPath (Issue <see cref="16)"/>
  1534. /// - Changed Ctrl to Alt when recalcing path continously in the Path Types example scene to avoid
  1535. /// clearing the points for the MultiTargetPath at the same time (it was also using Ctrl).
  1536. /// - Fixed strange looking movement artifacts during the first few frames when using RVO and interpolation was enabled.
  1537. /// - AlternativePath modifier will no longer cause underflows if penalties have been reset during the time it was active. It will now
  1538. /// only log a warning message and zero the penalty.
  1539. /// - Added Pathfinding.GraphUpdateObject.resetPenaltyOnPhysics (and similar in GraphUpdateScene) to force grid graphs not to reset penalties when
  1540. /// updating graphs.
  1541. /// - Fixed a bug which could cause pathfinding to crash if using the preprocessor directive ASTAR_NoTagPenalty.
  1542. /// - Fixed a case where StartEndModifier.exactEndPoint would incorrectly be used instead of exactStartPoint.
  1543. /// - AlternativePath modifier now correctly resets penalties if it is destroyed.
  1544. ///
  1545. /// - 3.2.4.1
  1546. /// - Unity Asset Store guys complained about the wrong key image.
  1547. /// I had to update the version number to submit again.
  1548. ///
  1549. /// - 3.2.4
  1550. /// - Highlights
  1551. /// - RecastGraph can now rasterize colliders as well!
  1552. /// - RecastGraph can rasterize colliders added to trees on unity terrains!
  1553. /// - RecastGraph will use Graphics.DrawMeshNow functions in Unity 4 instead of creating a dummy GameObject.
  1554. /// This will remove the annoying "cleaning up leaked mesh object" debug message which unity would log sometimes.
  1555. /// The debug mesh is now also only visible in the Scene View when the A* object is selected as that seemed
  1556. /// most logical to me (don't like this? post something in the forum saying you want a toggle for it and I will implement
  1557. /// one).
  1558. /// - GraphUpdateObject now has a \link Pathfinding.GraphUpdateObject.updateErosion toggle \endlink specifying if erosion (on grid graphs) should be recalculated after applying the guo.
  1559. /// This enables one to add walkable nodes which should have been made unwalkable by erosion.
  1560. /// - Made it a bit easier (and added more correct documentation) to add custom graph types when building for iPhone with Fast But No Exceptions (see iPhone page).
  1561. /// - Changes
  1562. /// - RecastGraph now only rasterizes enabled MeshRenderers. Previously even disabled ones would be included.
  1563. /// - Renamed RecastGraph.includeTerrain to RecastGraph.rasterizeTerrain to better match other variable naming.
  1564. /// - Fixes
  1565. /// - AIPath now resumes path calculation when the component or GameObject has been disabled and then reenabled.
  1566. ///
  1567. /// - 3.2.3 (free version mostly)
  1568. /// - Fixes
  1569. /// - A UNITY_IPHONE directive was not included in the free version. This caused compilation errors when building for iPhone.
  1570. /// - Changes
  1571. /// - Some documentation updates
  1572. ///
  1573. /// - 3.2.2
  1574. /// - Changes
  1575. /// - Max Slope in grid graphs is now relative to the graph's up direction instead of world up (makes more sense I hope)
  1576. /// - Note
  1577. /// - Update really too small to be an update by itself, but I was updating the build scripts I use for the project and had to upload a new version because of technical reasons.
  1578. ///
  1579. /// - 3.2.1
  1580. /// - Fixes
  1581. /// - Fixed bug which caused compiler errors on build (player, not in editor).
  1582. /// - Version number was by mistake set to 3.1 instead of 3.2 in the previous version.
  1583. ///
  1584. /// - 3.2
  1585. /// - Highlights
  1586. /// - A complete Local Avoidance system is now included in the pro version!
  1587. /// - Almost every allocation can now be pooled. Which means a drastically lower allocation rate (GC get's called less often).
  1588. /// - Initial node penalty per graph can now be set.
  1589. /// Custom graph types implementing CreateNodes must update their implementations to properly assign this value.
  1590. /// - GraphUpdateScene has now many more tools and options which can be used.
  1591. /// - Added Pathfinding.PathUtilities which contains some usefull functions for working with paths and nodes.
  1592. /// - Added Pathfinding.Node.GetConnections to enable easy getting of all connections of a node.
  1593. /// The Node.connections array does not include custom connections which for example grid graphs use.
  1594. /// - Seeker.PostProcess function was added for easy postprocessing of paths calculated without a seeker.
  1595. /// - AstarPath.WaitForPath. Wait (block) until a specific path has been calculated.
  1596. /// - Path.WaitForPath. Wait using a coroutine until a specific path has been calculated.
  1597. /// - LayeredGridGraph now has support for up to 65535 layers (theoretically, but don't try it as you would probably run out of memory)
  1598. /// - Recast graph generation is now up to twice as fast!
  1599. /// - Fixed some UI glitches in Unity 4.
  1600. /// - Debugger component has more features and a slightly better layout.
  1601. /// - Fixes
  1602. /// - Fixed a bug which caused the SimpleSmoothModifier with uniformSegmentLength enabled to skip points sometimes.
  1603. /// - Fixed a bug where importing graphs additively which had the same GUID as a graph already loaded could cause bugs in the inspector.
  1604. /// - Fixed a bug where updating a GridGraph loaded from file would throw a NullReferenceException.
  1605. /// - Fixed a bug which could cause error messages for paths not to be logged
  1606. /// - Fixed a number of small bugs related to updating grid graphs (especially when using erosion as well).
  1607. /// - Overflows could occur in some navmesh/polygon math related functions when working with Int3s. This was because the precision of them had recently been increased.
  1608. /// Further down the line this could cause incorrect answers to GetNearest queries.
  1609. /// Fixed by casting to long when necessary.
  1610. /// - Navmesh2.shader defined "Cull Off" twice.
  1611. /// - Pathfinding threads are now background threads. This will prevent them from blocking the process to terminate if they of some reason are still alive (hopefully at least).
  1612. /// - When really high penalties are applied (which could be underflowed negative penalties) a warning message is logged.
  1613. /// Really high penalties (close to max uint value) can otherwise cause overflows and in some cases infinity loops because of that.
  1614. /// - ClosestPointOnTriangle is now spelled correctly.
  1615. /// - MineBotAI now uses Update instead of FixedUpdate.
  1616. /// - Use Dark Skin option is now exposed again since it could be incorrectly set sometimes. Now you can force it to light or dark, or set it to auto.
  1617. /// - Fixed recast graph bug when using multiple terrains. Previously only one terrain would be used.
  1618. /// - Fixed some UI glitches in Unity 4.
  1619. /// - Changes
  1620. /// - Removed Pathfinding.NNInfo.priority.
  1621. /// - Removed Pathfinding.NearestNodePriority.
  1622. /// - Conversions between NNInfo and Node are now explicit to comply with the rule of "if information might be lost: use explicit casts".
  1623. /// - NNInfo is now a struct.
  1624. /// - GraphHitInfo is now a struct.
  1625. /// - Path.vectorPath and Path.path are now List<Vector3> and List<Node> respectively. This is done to enable pooling of resources more efficiently.
  1626. /// - Added Pathfinding.Node.RecalculateConnectionCosts.
  1627. /// - Moved IsPathPossible from GraphUpdateUtilities to PathUtilities.
  1628. /// - Pathfinding.Path.processed was replaced with Pathfinding.Path.state. The new variable will have much more information about where
  1629. /// the path is in the pathfinding pipeline.
  1630. /// - <b>Paths should not be created with constructors anymore, instead use the PathPool class and then call some Setup() method</b>
  1631. /// - When the AstarPath object is destroyed, calculated paths in the return queue are not returned with errors anymore, but just returned.
  1632. /// - Removed depracated methods AstarPath.AddToPathPool, RecyclePath, GetFromPathPool.
  1633. /// - Bugs
  1634. /// - C++ Version of Recast does not work on Windows.
  1635. /// - GraphUpdateScene does in some cases not draw correctly positioned gizmos.
  1636. /// - Starting two webplayers and closing down the first might cause the other one's pathfinding threads to crash (unity bug?) (confirmed on osx)
  1637. ///
  1638. /// - 3.1.4 (iOS fixes)
  1639. /// - Fixes
  1640. /// - More fixes for the iOS platform.
  1641. /// - The "JsonFx.Json.dll" file is now correctly named.
  1642. /// - Changes
  1643. /// - Removed unused code from DotNetZip which reduced the size of it with about 20 KB.
  1644. ///
  1645. /// - 3.1.3 (free version only)
  1646. /// - Fixes
  1647. /// - Some of the fixes which were said to have been made in 3.1.2 were actually not included in the free version of the project. Sorry about that.
  1648. /// - Also includes a new JsonFx and Ionic.Zip dll. This should make it possible to build with the .Net 2.0 Subset again see:
  1649. /// http://www.arongranberg.com/forums/topic/ios-problem/page/1/
  1650. ///
  1651. /// - 3.1.2 (small bugfix release)
  1652. /// - Fixes
  1653. /// - Fixed a bug which caused builds for iPhone to fail.
  1654. /// - Fixed a bug which caused runtime errors on the iPhone platform.
  1655. /// - Fixed a bug which caused huge lag in the editor for some users when using grid graphs.
  1656. /// - ListGraphs are now correctly loaded as PointGraphs when loading data from older versions of the system.
  1657. /// - Changes
  1658. /// - Moved JsonFx into the namespace Pathfinding.Serialization.JsonFx to avoid conflicts with users own JsonFx libraries (if they used JsonFx).
  1659. ///
  1660. /// - Known bugs
  1661. /// - Recast graph does not work when using static batching on any objects included.
  1662. ///
  1663. /// - 3.1.1 (small bugfix release)
  1664. /// - Fixes
  1665. /// - Fixed a bug which would cause Pathfinding.GraphUpdateUtilities.UpdateGraphsNoBlock to throw an exception when using multithreading
  1666. /// - Fixed a bug which caused an error to be logged and no pathfinding working when not using multithreading in the free version of the project
  1667. /// - Fixed some example scene bugs due to downgrading the project from Unity 3.5 to Unity 3.4
  1668. ///
  1669. /// - 3.1
  1670. /// - Fixed bug which caused LayerMask fields (GridGraph inspector for example) to behave weirdly for custom layers on Unity 3.5 and up.
  1671. /// - The color setting "Node Connection" now actually sets the colors of the node connections when no other information should be shown using the connection colors or when no data is available.
  1672. /// - Put the Int3 class in a separate file.
  1673. /// - Casting between Int3 and Vector3 is no longer implicit. This follows the rule of "if information might be lost: use explicit casts".
  1674. /// - Renamed ListGraph to PointGraph. "ListGraph" has previously been used for historical reasons. PointGraph is a more suitable name.
  1675. /// - Graph can now have names in the editor (just click the name in the graph list)
  1676. /// - Graph Gizmos can now be selectively shown or hidden per graph (small "eye" icon to the right of the graph's name)
  1677. /// - Added GraphUpdateUtilities with many useful functions for updating graphs.
  1678. /// - Erosion for grid graphs can now use tags instead of walkability
  1679. /// - Fixed a bug where using One Way links could in some cases result in a NullReferenceException being thrown.
  1680. /// - Vector3 fields in the graph editors now look a bit better in Unity 3.5+. EditorGUILayout.Vector3Field didn't show the XYZ labels in a good way (no idea why)
  1681. /// - GridGraph.useRaycastNormal is now enabled only if the Max Slope is less than 90 degrees. Previously it was a manual setting.
  1682. /// - The keyboard shortcut to scan all graphs does now also work even when the graphs are not deserialized yet (which happens a lot in the editor)
  1683. /// - Added NodeLink script, which can be attached to GameObjects to add manual links. This system will eventually replace the links system in the A* editor.
  1684. /// - Added keyboard shortcuts for adding and removing links. See Menubar -> Edit -> Pathfinding
  1685. /// Note: Some features are restricted to Unity 3.5 and newer because of technical limitations in earlier versions (especially multi-object editing related features).
  1686. ///
  1687. /// - 3.1 beta (version number 3.0.9.9 in Unity due to technical limitations of the System.Versions class)
  1688. /// - Multithreading is now enabled in the free version of the A* Pathfinding Project!
  1689. /// - Better support for graph updates called during e.g OnPostScan.
  1690. /// - PathID is now used as a short everywhere in the project
  1691. /// - G,H and penalty is now used as unsigned integers everywhere in the project instead of signed integers.
  1692. /// - There is now only one tag per node (if not the \<see cref="define"/> ConfigureTagsAsMultiple is set).
  1693. /// - Fixed a bug which could make connections between graphs invalid when loading from file (would also log annoying error messages).
  1694. /// - Erosion (GridGraph) can now be used even when updating the graph during runtime.
  1695. /// - Fixed a bug where the GridGraph could return null from it's GetNearestForce calls which ended up later throwing a NullReferenceException.
  1696. /// - FunnelModifier no longer warns if any graph in the path does not implement the IFunnelGraph interface (i.e have no support for the funnel algorithm)
  1697. /// and instead falls back to add node positions to the path.
  1698. /// - Added a new graph type : LayerGridGraph which works like a GridGraph, but has support for multiple layers of nodes (e.g multiple floors in a building).
  1699. /// - ScanOnStartup is now exposed in the editor.
  1700. /// - Separated temporary path data and connectivity data.
  1701. /// - Rewritten multithreading. You can now run any number of threads in parallel.
  1702. /// - To avoid possible infinite loops, paths are no longer returned with just an error when requested at times they should not (e.g right when destroying the pathfinding object)
  1703. /// - Cleaned up code in AstarPath.cs, members are now structured and many obsolete members have been removed.
  1704. /// - Rewritten serialization. Now uses Json for settings along with a small part hardcoded binary data (for performance and memory).
  1705. /// This is a lot more stable and will be more forwards and backwards compatible.
  1706. /// Data is now saved as zip files(in memory, but can be saved to file) which means you can actually edit them by hand if you want!
  1707. /// - Added dependency JsonFx (modified for smaller code size and better compatibility).
  1708. /// - Added dependency DotNetZip (reduced version and a bit modified) for zip compression.
  1709. /// - Graph types wanting to serialize members must add the JsonOptIn attribute to the class and JsonMember to any members to serialize (in the JsonFx.Json namespace)
  1710. /// - Graph types wanting to serialize a bit more data (custom), will have to override some new functions from the NavGraph class to do that instead of the old serialization functions.
  1711. /// - Changed from using System.Guid to a custom written Guid implementation placed in Pathfinding.Util.Guid. This was done to improve compabitility with iOS and other platforms.
  1712. /// Previously it could crash when trying to create one because System.Guid was not included in the runtime.
  1713. /// - Renamed callback AstarPath.OnSafeNodeUpdate to AstarPath.OnSafeCallback (also added AstarPath.OnThreadSafeCallback)
  1714. /// - MultiTargetPath would throw NullReferenceException if no valid start node was found, fixed now.
  1715. /// - Binary heaps are now automatically expanded if needed, no annoying warning messages.
  1716. /// - Fixed a bug where grid graphs would not update the correct area (using GraphUpdateObject) if it was rotated.
  1717. /// - Node position precision increased from 100 steps per world unit to 1000 steps per world unit (if 1 world unit = 1m, that is mm precision).
  1718. /// This also means that all costs and penalties in graphs will need to be multiplied by 10 to match the new scale.
  1719. /// It also means the max range of node positions is reduced a bit... but it is still quite large (about 2 150 000 world units in either direction, that should be enough).
  1720. /// - If Unity 3.5 is used, the EditorGUIUtility.isProSkin field is used to toggle between light and dark skin.
  1721. /// - Added LayeredGridGraph which works almost the same as grid graphs, but support multiple layers of nodes.
  1722. /// - Note: Dropped Unity 3.3 support.
  1723. ///
  1724. /// <b>Known Bugs:</b> The C++ version of Recast does not work on Windows
  1725. ///
  1726. /// - Documentation Update
  1727. /// - Changed from FixedUpdate to Update in the Get Started Guide. CharacterController.SimpleMove should not be called more than once per frame,
  1728. /// so this might have lowered performance when using many agents, sorry about this typo.
  1729. /// - 3.0.9
  1730. /// - The List Graph's "raycast" variable is now serialized correctly, so it will be saved.
  1731. /// - List graphs do not generate connections from nodes to themselves anymore (yielding slightly faster searches)
  1732. /// - List graphs previously calculated cost values for connections which were very low (they should have been 100 times larger),
  1733. /// this can have caused searches which were not very accurate on small scales since the values were rounded to the nearest integer.
  1734. /// - Added Pathfinding.Path.recalcStartEndCosts to specify if the start and end nodes connection costs should be recalculated when searching to reflect
  1735. /// 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.
  1736. /// - Fixed a compile time warning in the free version from referecing obsolete variables in the project.
  1737. /// - 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.
  1738. /// - Fixed typo, either there are eight (8) or four (4) max connections per node in a GridGraph, never six (6).
  1739. /// - AlternativePath will no longer cause errors when using multithreading!
  1740. /// - Added Pathfinding.ConstantPath, a path type which finds all nodes in a specific distance (cost) from a start node.
  1741. /// - Added Pathfinding.FloodPath and Pathfinding.FloodPathTracer as an extreamly fast way to generate paths to a single point in for example TD games.
  1742. /// - 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
  1743. /// - 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)
  1744. /// - Using \<see cref="defines"/>, the pathfinder can now be better profiled (see Optimizations tab -> Profile Astar)
  1745. /// - Added example scene Path Types (mainly useful for A* Pro users, so I have only included it for them)
  1746. /// - Added many more tooltips in the editor
  1747. /// - Fixed a bug which would double the Y coordinate of nodes in grid graphs when loading from saved data (or caching startup)
  1748. /// - 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)
  1749. /// - Some other bugfixes
  1750. /// - 3.0.8.2
  1751. /// - Fixed a critical bug which could render the A* inspector unusable on Windows due to problems with backslashes and forward slashes in paths.
  1752. /// - 3.0.8.1
  1753. /// - Fixed critical crash bug. When building, a preprocessor-directive had messed up serialization so the game would probably crash from an OutOfMemoryException.
  1754. /// - 3.0.8
  1755. /// - Graph saving to file is now exposed for users of the Free version
  1756. /// - Fixed a bug where penalties added using a GraphUpdateObject would be overriden if updatePhysics was turned on in the GraphUpdateObject
  1757. /// - Fixed a bug where list graphs could ignore some children nodes, especially common if the hierarchy was deep
  1758. /// - Fixed the case where empty messages would spam the log (instead of spamming somewhat meaningful messages) when path logging was set to Only Errors
  1759. /// - 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.
  1760. /// - You can now set the size of the red cubes shown in place of unwalkable nodes (Settings-->Show Unwalkable Nodes-->Size)
  1761. /// - Dynamic search of where the EditorAssets folder is, so now you can place it anywhere in the project.
  1762. /// - Minor A* inspector enhancements.
  1763. /// - 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
  1764. /// - Modifiers can now be enabled or disabled in the editor
  1765. /// - 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).
  1766. /// - Added AIFollow.canSearch to disable or enable searching for paths due to popular request.
  1767. /// - Added AIFollow.canMove to disable or enable moving due to popular request.
  1768. /// - 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.
  1769. /// - Removed Path.customData since it is a much better solution to create a new path class which inherits from Path.
  1770. /// - Seeker.StartPath is now implemented with overloads instead of optional parameters to simplify usage for Javascript users
  1771. /// - Added Curved Nonuniform spline as a smoothing option for the Simple Smooth modifier.
  1772. /// - Added Pathfinding.WillBlockPath as function for checking if a GraphUpdateObject would block pathfinding between two nodes (useful in TD games).
  1773. /// - 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.
  1774. /// - Added shortcuts to specific types of graphs, AstarData.navmesh, AstarData.gridGraph, AstarData.listGraph
  1775. /// - <b>Known Bugs:</b> The C++ version of Recast does not work on Windows
  1776. /// - 3.0.7
  1777. /// - Grid Graphs can now be scaled to allow non-square nodes, good for isometric games.
  1778. /// - 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
  1779. /// - Placed the Scan keyboard shortcut code in a different place, hopefully it will work more often now
  1780. /// - Disabled GUILayout in the AstarPath script for a possible small speed boost
  1781. /// - Some debug variables (such as AstarPath.PathsCompleted) are now only updated if the ProfileAstar define is enabled
  1782. /// - DynamicGridObstacle will now update nodes correctly when the object is destroyed
  1783. /// - Unwalkable nodes no longer shows when Show Graphs is not toggled
  1784. /// - Removed Path.multithreaded since it was not used
  1785. /// - Removed Path.preCallback since it was obsolate
  1786. /// - Added Pathfinding.XPath as a more customizable path
  1787. /// - Added example of how to use MultiTargetPaths to the documentation as it was seriously lacking info on that area
  1788. /// - The viewing mesh scaling for recast graphs is now correct also for the C# version
  1789. /// - The StartEndModifier now changes the path length to 2 for correct applying if a path length of 1 was passed.
  1790. /// - The progressbar is now removed even if an exception was thrown during scanning
  1791. /// - Two new example scenes have been added, one for list graphs which includes sample links, and another one for recast graphs
  1792. /// - 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
  1793. /// - 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".
  1794. /// - The C# version of Recast does now use Character Radius instead of Erosion Radius (world units instead of voxels)
  1795. /// - Fixed an IndexOutOfRange exception which could occur when saving a graph with no nodes to file
  1796. /// - <b>Known Bugs:</b> The C++ version of Recast does not work on Windows
  1797. /// - 3.0.6
  1798. /// - 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).
  1799. /// - Removed the overload AstarData.AddGraph (string type, NavGraph graph) since it was obsolete. AstarData.AddGraph (Pathfinding.NavGraph) should be used now.
  1800. /// - Fixed a few bugs in the FunnelModifier which could cause it to return invalid paths
  1801. /// - A reference image can now be generated for the Use Texture option for Grid Graphs
  1802. /// - Fixed an editor bug with graphs which had no editors
  1803. /// - 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
  1804. /// - Deleted the 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
  1805. /// - 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
  1806. /// - The Dark Skin is now automatically used if the rest of Unity uses the dark skin(hopefully)
  1807. /// - Fixed a bug which could cause Unity to crash when using multithreading and creating a new AstarPath object during runtime
  1808. /// - 3.0.5
  1809. /// - \link Pathfinding.PointGraph List Graphs \endlink now support UpdateGraphs. This means that they for example can be used with the DynamicObstacle script.
  1810. /// - List Graphs can now gather nodes based on GameObject tags instead of all nodes as childs of a specific GameObject.
  1811. /// - List Graphs can now search recursively for childs to the 'root' GameObject instead of just searching through the top-level children.
  1812. /// - Added custom area colors which can be edited in the inspector (A* inspector --> Settings --> Color Settings --> Custom Area Colors)
  1813. /// - Fixed a NullReference bug which could occur when loading a Unity Reference with the AstarSerializer.
  1814. /// - Fixed some bugs with the FleePath and RandomPath which could cause the StartEndModifier to assign the wrong endpoint to the path.
  1815. /// - Documentation is now more clear on what is A* Pathfinding Project Pro only features.
  1816. /// - Pathfinding.NNConstraint now has a variable to constrain which graphs to search (A* Pro only).\n
  1817. /// This is also available for Pathfinding.GraphUpdateObject which now have a field for an NNConstraint where it can constrain which graphs to update.
  1818. /// - StartPath calls on the Seeker can now take a parameter specifying which graphs to search for close nodes on (A* Pro only)
  1819. /// - Added the delegate AstarPath.OnAwakeSettings which is called as the first thing in the Awake function, can be used to set up settings.
  1820. /// - Pathfinding.UserConnection.doOverrideCost is now serialized correctly. This represents the toggle to the right of the "Cost" field when editing a link.
  1821. /// - Fixed some bugs with the RecastGraph when spans were partially out-of-bounds, this could generate seemingly random holes in the mesh
  1822. /// - 3.0.4 (only pro version affected)
  1823. /// - 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).
  1824. /// It can be enabled through A* Inspector --> Settings --> Editor Settings --> Use Dark Skin
  1825. /// - Added option to include or not include out of bounds voxels (Y axis below the graph only) for Recast graphs.
  1826. /// - 3.0.3 (only pro version affected)
  1827. /// - Fixed a NullReferenceException caused by Voxelize.cs which could surface if there were MeshFilters with no Renderers on GameObjects (Only Pro version affected)
  1828. /// - 3.0.2
  1829. /// - Textures can now be used to add penalty, height or change walkability of a Grid Graph (A* Pro only)
  1830. /// - Slope can now be used to add penalty to nodes
  1831. /// - Height (Y position) can now be usd to add penalty to nodes
  1832. /// - Prioritized graphs can be used to enable prioritizing some graphs before others when they are overlapping
  1833. /// - Several bug fixes
  1834. /// - 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
  1835. /// - 3.0.1
  1836. /// - Fixed Unity 3.3 compability
  1837. /// - 3.0
  1838. /// - Rewrote the system from scratch
  1839. /// - Funnel modifier
  1840. /// - Easier to extend the system
  1841. ///
  1842. /// - x. releases are major rewrites or updates to the system.
  1843. /// - .x releases are quite big feature updates
  1844. /// - ..x releases are the most common updates, fix bugs, add some features etc.
  1845. /// - ...x releases are quickfixes, most common when there was a really bad bug which needed fixing ASAP.
  1846. /// </summary>