Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

access agent type via code

Discussion in 'Navigation' started by Twyker, May 10, 2018.

  1. Twyker

    Twyker

    Joined:
    Nov 10, 2016
    Posts:
    12
    Hey there folks! :)

    Quick question: Is there a way to make new navmesh agent types at runtime or is there a way to access the types? EDIT: I found NavMesh.CreateSettings() to make a new agent type, but as it's just a struct, I can't change any of the settings later? How should one use this? :(

    In my current project, I need to be able to change the radius of a given agent at runtime OR I guess which was my next go-to solution, was the idea to just create multiple agent types beforehand for most eventualities. I'm guessing there is no realistic limit to many I can make, right?

    Thanks for any help or input! :)
     
    Last edited: May 11, 2018