You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-21 14:57:09 +00:00
Merge pull request #94362 from smix8/navpoly_unref_fix
Fix NavigationPolygon not updating consistently on rebakes
This commit is contained in:
@@ -193,6 +193,10 @@ void NavigationPolygon::set_data(const Vector<Vector2> &p_vertices, const Vector
|
|||||||
for (int i = 0; i < p_polygons.size(); i++) {
|
for (int i = 0; i < p_polygons.size(); i++) {
|
||||||
polygons.write[i].indices = p_polygons[i];
|
polygons.write[i].indices = p_polygons[i];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
MutexLock lock(navigation_mesh_generation);
|
||||||
|
navigation_mesh.unref();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NavigationPolygon::get_data(Vector<Vector2> &r_vertices, Vector<Vector<int>> &r_polygons) {
|
void NavigationPolygon::get_data(Vector<Vector2> &r_vertices, Vector<Vector<int>> &r_polygons) {
|
||||||
|
|||||||
Reference in New Issue
Block a user