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

NavMeshAgent.remainingDistance Question

Discussion in 'Navigation' started by SentientSkull, Aug 24, 2019.

  1. SentientSkull

    SentientSkull

    Joined:
    Apr 26, 2013
    Posts:
    75
    Is there a performance hit from calling NavMeshAgent.remainingDistance? In other words, does NavMeshAgent calculate this continuously and you're just accessing it via the remainingDistance property, or does it do the calculation when the property is called?
     
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589