From 3e6e67cf25f4d9404ce6f27eb5c8dd1f7d6adba1 Mon Sep 17 00:00:00 2001 From: ikpil Date: Mon, 26 Jun 2023 21:20:18 +0900 Subject: [PATCH] fixed navmesh tool --- src/DotRecast.Recast.Demo/Tools/TestNavmeshTool.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/DotRecast.Recast.Demo/Tools/TestNavmeshTool.cs b/src/DotRecast.Recast.Demo/Tools/TestNavmeshTool.cs index 0554b48..d00ea3d 100644 --- a/src/DotRecast.Recast.Demo/Tools/TestNavmeshTool.cs +++ b/src/DotRecast.Recast.Demo/Tools/TestNavmeshTool.cs @@ -195,6 +195,7 @@ public class TestNavmeshTool : IRcTool { if (m_sposSet && m_eposSet && m_startRef != 0 && m_endRef != 0) { + m_polys = new(); m_navQuery.FindPath(m_startRef, m_endRef, m_spos, m_epos, m_filter, ref m_polys, new(enableRaycast ? DtNavMeshQuery.DT_FINDPATH_ANY_ANGLE : 0, float.MaxValue)); if (0 < m_polys.Count) @@ -327,6 +328,7 @@ public class TestNavmeshTool : IRcTool { if (m_sposSet && m_eposSet && m_startRef != 0 && m_endRef != 0) { + m_polys = new(); m_navQuery.FindPath(m_startRef, m_endRef, m_spos, m_epos, m_filter, ref m_polys, new(enableRaycast ? DtNavMeshQuery.DT_FINDPATH_ANY_ANGLE : 0, float.MaxValue)); if (0 < m_polys.Count)