private void Awake()
{
Type pathFindType = typeof(PathFind);
fi_pathUnits = pathFindType.GetFieldByName("m_pathUnits");
fi_queueFirst = pathFindType.GetFieldByName("m_queueFirst");
fi_queueLast = pathFindType.GetFieldByName("m_queueLast");
fi_calculating = pathFindType.GetFieldByName("m_calculating");
fi_queueLock = pathFindType.GetFieldByName("m_queueLock");
fi_pathFindThread = pathFindType.GetFieldByName("m_pathFindThread");
fi_terminated = pathFindType.GetFieldByName("m_terminated");
this.m_pathfindProfiler = new ThreadProfiler();
this.m_laneLocation = new uint[262144];
this.m_laneTarget = new PathUnit.Position[262144];
this.m_buffer = new CustomPathFind.BufferItem[65536];
this.m_bufferMin = new int[1024];
this.m_bufferMax = new int[1024];
this.m_queueLock = new object();
this.m_bufferLock = Singleton<PathManager>.instance.m_bufferLock;
this.m_pathUnits = Singleton<PathManager>.instance.m_pathUnits;
this.m_pathFindThread = new Thread(new ThreadStart(this.PathFindThread));
this.m_pathFindThread.Name = "Pathfind";
this.m_pathFindThread.Priority = SimulationManager.SIMULATION_PRIORITY;
this.m_pathFindThread.Start();
if (!this.m_pathFindThread.IsAlive)
{
CODebugBase<LogChannel>.Error(LogChannel.Core, "Path find thread failed to start!");
}
}