From 6d365b1d277fb1328d92ff1405452d5f822c2598 Mon Sep 17 00:00:00 2001 From: Cornelius Andreas Rosenaa <75324436+coffandro@users.noreply.github.com> Date: Wed, 1 Jan 2025 21:35:40 +0100 Subject: [PATCH 1/3] Update CollectTilemapSourcesCache2d.cs to isolate pre 2022 versions outside editor --- .../Scripts/CollectTilemapSourcesCache2d.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/NavMeshComponents/Scripts/CollectTilemapSourcesCache2d.cs b/NavMeshComponents/Scripts/CollectTilemapSourcesCache2d.cs index 8d2c8d4..e38b176 100644 --- a/NavMeshComponents/Scripts/CollectTilemapSourcesCache2d.cs +++ b/NavMeshComponents/Scripts/CollectTilemapSourcesCache2d.cs @@ -27,6 +27,7 @@ protected override void Awake() base.Awake(); } +#if UNITY_EDITOR || UNITY_2022_2_OR_NEWER && UNITY_EDITOR private void OnTilemapTileChanged(Tilemap tilemap, Tilemap.SyncTile[] syncTiles) { if (tilemap == _tilemap) @@ -51,6 +52,8 @@ private void OnTilemapTileChanged(Tilemap tilemap, Tilemap.SyncTile[] syncTiles) } } } +#endif + public AsyncOperation UpdateNavMesh(NavMeshData data) { @@ -75,14 +78,18 @@ public override void PostCollectSources(NavMeshSurface surface, List Date: Wed, 1 Jan 2025 21:36:20 +0100 Subject: [PATCH 2/3] Update CollectTilemapSourcesCache2d.cs.meta From c87cd5ac85adbbd40e1080016d573f437ac5ac2b Mon Sep 17 00:00:00 2001 From: Cornelius Andreas Rosenaa <75324436+coffandro@users.noreply.github.com> Date: Wed, 1 Jan 2025 21:44:12 +0100 Subject: [PATCH 3/3] Unneeded code that would break 2022 --- NavMeshComponents/Scripts/CollectTilemapSourcesCache2d.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NavMeshComponents/Scripts/CollectTilemapSourcesCache2d.cs b/NavMeshComponents/Scripts/CollectTilemapSourcesCache2d.cs index e38b176..762ac9e 100644 --- a/NavMeshComponents/Scripts/CollectTilemapSourcesCache2d.cs +++ b/NavMeshComponents/Scripts/CollectTilemapSourcesCache2d.cs @@ -27,7 +27,7 @@ protected override void Awake() base.Awake(); } -#if UNITY_EDITOR || UNITY_2022_2_OR_NEWER && UNITY_EDITOR +#if UNITY_EDITOR || UNITY_2022_2_OR_NEWER private void OnTilemapTileChanged(Tilemap tilemap, Tilemap.SyncTile[] syncTiles) { if (tilemap == _tilemap) @@ -78,7 +78,7 @@ public override void PostCollectSources(NavMeshSurface surface, List