From f8bf87e0b100778deb437b037b3d953e636c77dc Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 20 Jan 2021 09:14:30 +0100 Subject: [PATCH] Fixes --- Source/Engine/Navigation/NavMeshRuntime.cpp | 8 +++++--- .../Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Source/Engine/Navigation/NavMeshRuntime.cpp b/Source/Engine/Navigation/NavMeshRuntime.cpp index abd706d25..3d112a39e 100644 --- a/Source/Engine/Navigation/NavMeshRuntime.cpp +++ b/Source/Engine/Navigation/NavMeshRuntime.cpp @@ -644,7 +644,10 @@ void NavMeshRuntime::AddTileInternal(NavMesh* navMesh, NavMeshTileData& tileData if (tileRef) { // Remove any existing tile at that location - _navMesh->removeTile(tileRef, nullptr, nullptr); + if (dtStatusFailed(_navMesh->removeTile(tileRef, nullptr, nullptr))) + { + LOG(Warning, "Failed to remove tile from navmesh {0}.", Properties.Name); + } // Reuse tile data container for (int32 i = 0; i < _tiles.Count(); i++) @@ -657,12 +660,11 @@ void NavMeshRuntime::AddTileInternal(NavMesh* navMesh, NavMeshTileData& tileData } } } - else + if (!tile) { // Add tile tile = &_tiles.AddOne(); } - ASSERT(tile); // Copy tile properties tile->NavMesh = navMesh; diff --git a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs index a25e00fbb..8b679fb7a 100644 --- a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs +++ b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs @@ -402,7 +402,7 @@ namespace Flax.Build.Bindings return false; // Value constructors (eg. Vector2(1, 2)) - // TODO: support value constructores for default value attribute + // TODO: support value constructors for default value attribute if (value.Contains('(') && value.Contains(')')) return false; @@ -1096,7 +1096,7 @@ namespace Flax.Build.Bindings Utilities.WriteFileIfChanged(bindings.GeneratedCSharpFilePath, contents.ToString()); // Ensure that generated file is included into build - if (useBindings && moduleBuildInfo != null && !moduleBuildInfo.SourceFiles.Contains(bindings.GeneratedCSharpFilePath)) + if (!moduleBuildInfo.SourceFiles.Contains(bindings.GeneratedCSharpFilePath)) { moduleBuildInfo.SourceFiles.Add(bindings.GeneratedCSharpFilePath); }