mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-22 03:53:04 +00:00
increase navmesh PathfindingIterationsPerFrame to 1000
This commit is contained in:
parent
feb0b6e74a
commit
bae1f0694e
2 changed files with 6 additions and 0 deletions
|
@ -549,3 +549,4 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_maxTimePerFrameMs: 0
|
||||
m_navMeshPathfindingIterationsPerFrame: 1000
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Diagnostics;
|
|||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
|
||||
namespace SanAndreasUnity.Behaviours
|
||||
{
|
||||
|
@ -78,11 +79,15 @@ namespace SanAndreasUnity.Behaviours
|
|||
private static readonly FieldInfo s_leftNodeField = s_nodeType.GetField("<Left>k__BackingField", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
private static readonly FieldInfo s_itemNodeField = s_nodeType.GetField("<Item>k__BackingField", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
[SerializeField] private int m_navMeshPathfindingIterationsPerFrame = 100;
|
||||
|
||||
|
||||
|
||||
protected override void OnSingletonStart()
|
||||
{
|
||||
this.BackgroundJobRunner.EnsureBackgroundThreadStarted();
|
||||
|
||||
NavMesh.pathfindingIterationsPerFrame = m_navMeshPathfindingIterationsPerFrame;
|
||||
}
|
||||
|
||||
protected override void OnSingletonDisable()
|
||||
|
|
Loading…
Reference in a new issue