Search Unity

A* Pathfinding 2.9 Is Released (Unity 3 Compatible)

Discussion in 'Assets and Asset Store' started by TowerOfBricks, Nov 16, 2010.

  1. xcube

    xcube

    Joined:
    Nov 27, 2011
    Posts:
    40
    Hi! I'm using the free version 3.0.6. Go through the lesson "Get Started With The A * Pathfinding Project". In the console, always error:

    vertexCount> 60 000
    UnityEditor.DockArea: OnGUI ()

    How can it be avoided?
     
  2. TowerOfBricks

    TowerOfBricks

    Joined:
    Oct 20, 2007
    Posts:
    961
    Hi XCube

    Try to upgrade to Unity 3.5 (beta), I have heard from many that it works better there, the 60K vertex error is a Unity bug AFAIK.

    And to any others with questions, I have started a forum for the pathfinding project, please use that for questions.
    http://www.arongranberg.com/forums/forum/pathfinding-project/
     
  3. xcube

    xcube

    Joined:
    Nov 27, 2011
    Posts:
    40
    sturestone, thanks!
    I like your Asset, I think I'll buy it.

    p.s.
    Please continue its development.
     
    Last edited: Dec 28, 2011
  4. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    Hello,

    Posted this on your forums, but no replay at all.

    I’m using Unity 3.4.2 Pro and iOS Pro, I’m getting these errors when I import your script in to Unity.

    Any help would be great, I’m looking at buying the pro version but want to try the free version out in my game first.


    Assets/AstarPathfindingProject/Editor/GraphEditors/GridGeneratorEditor.cs(408,27): error CS0117: `Tools’ does not contain a definition for `current’

    Assets/AstarPathfindingProject/Editor/GraphEditors/GridGeneratorEditor.cs(437,34): error CS0117: `Tools’ does not contain a definition for `current’

    Assets/AstarPathfindingProject/Editor/GraphEditors/GridGeneratorEditor.cs(440,35): error CS0117: `Tools’ does not contain a definition for `pivotRotation’

    Assets/AstarPathfindingProject/Editor/GraphEditors/GridGeneratorEditor.cs(443,43): error CS0117: `Tools’ does not contain a definition for `viewTool’

    Assets/AstarPathfindingProject/Editor/GraphEditors/GridGeneratorEditor.cs(451,43): error CS0117: `Tools’ does not contain a definition for `viewTool’

    Assets/AstarPathfindingProject/Editor/GraphEditors/GridGeneratorEditor.cs(458,34): error CS0117: `Tools’ does not contain a definition for `current’

    Assets/AstarPathfindingProject/Editor/GraphEditors/GridGeneratorEditor.cs(465,35): error CS0117: `Tools’ does not contain a definition for `viewTool’
     
  5. TowerOfBricks

    TowerOfBricks

    Joined:
    Oct 20, 2007
    Posts:
    961
    I think you have got another class in your project which is named "Tools". That class would conflict with my project trying to access UnityEditor.Tools (it doesn't know which one to use, apparently it choose your version). This is a quite common problem. The solution is to find that class, and either put it inside a namespace or rename it.
    Sorry for not answering on the forums, the last two-three days have been hectic for me.
     
  6. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    That did it, got it working!

    What is the best method / fastest / performance (NavMesh, Grid, or ListGraph)? My scenes are already heavy, so I need the best method with least performance hit.

    Thanks,

    JL
     
  7. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    I can't get the "EndingCondition.cs" script to work. I have it on the game object with "AIFollow" and "Seeker". I tried a bunch of different variables for "HLimit", I put the target in "Target Point" but the seeker just still walks up to the target and rotates around it.

    Any help?

    Thanks,
     
  8. TowerOfBricks

    TowerOfBricks

    Joined:
    Oct 20, 2007
    Posts:
    961
    The navmesh graph or list graph are usually fastest.
    Speed depends on two things:
    1. The number of nodes searched
    2. The average degree (number of connections) for each node (grid graphs nodes usually have a degree of 6 to 8, navmesh graphs usually 2 or 3, point graphs can have any number).

    The Ending condition script is a sample script for how to use the ending condition class. Read the code to see what it actually does.
    Then you can edit the AIFollow's Repath function to gain that functionality.
     
  9. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    Thanks for the info,

    I have one more question,

    I set up a grid graph just to see how it works, I have a flight of stairs that go down to a smaller lower level, the graph just covers the first landing of the stairs and stops. The flight of stairs has two landings until it gets down to the lower level. How can I get the graph to cover the bottom level?

    Also, will a Nav Graph from your Pro version automatically cover lower levels?

    Thanks,

    JL
     
  10. TowerOfBricks

    TowerOfBricks

    Joined:
    Oct 20, 2007
    Posts:
    961
    Grid graphs are 2-dimensional, so you will have to create two grid graphs if you want to do that and link them manually... it can be a bit tricky though.

    Navmesh graphs (both in the free and pro version) supports any number of levels, though I think the recast graph can only automatically generate for up to either 16 or 32 levels, but that should be enough for most people I think.
     
  11. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    When I crate a build for iOS, I'm getting a bunch of errors because I changed the Tools Class on the other scripts. I's a plugin so not my scripts. Can I rename your "Tools" Class?

    Not sure how to fix this.

    Thanks,

    JL
     
  12. TowerOfBricks

    TowerOfBricks

    Joined:
    Oct 20, 2007
    Posts:
    961
    My project uses the UnityEditor.Tools class, it's built-in in Unity so you can't change it. You will have to change the places referencing to that Tools class. An easier method is probably to place that tools class inside a namespace and then add "using SomeNamespaceName;" at the top of the scripts which uses the class.
     
  13. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Great product!
     
  14. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    I placed the free version in my project and did nothing else, I did not add any of the demo scenes to the build or anything, I just imported it and ran a build and at the end of the build I get the following errors:

    I ran a build just before I imported your system and it built fine.
     
  15. TowerOfBricks

    TowerOfBricks

    Joined:
    Oct 20, 2007
    Posts:
    961
    Ouch, I think it cannot handle when I try to get ProcessorCount...
    In the Paralell.cs script (in AstarPathfindingProject folder--> Utilities) change all references to ProcessorCount to 1.
     
  16. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    Ok, that worked, will this give me a performance hit on iOS / Android with a dual core processor?

    I'm on Unity 3.4.2 Pro with iOS pro
    Mac Pro 12 Core
     
  17. TowerOfBricks

    TowerOfBricks

    Joined:
    Oct 20, 2007
    Posts:
    961
    I don't think I use the Paralell class for much except when I generate Recast graphs, so I don't think so.
     
  18. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    Great!

    Thanks!
     
  19. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    I just upgraded to the latest version, and it turns out that AlternativePath was the exact path modifier my project needed! I am getting huge props from my coworkers, and I wanted to pass on the praise to you since it was entirely your work. Thanks for making such an awesome product!
     
  20. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225
    Can any of your assets methods be used at runtime on procedurally generated worlds/levels (like minecraft or random dungeon generators)?