diff --git a/NavMeshComponents/Scripts/CollectTilemapSourcesCache2d.cs b/NavMeshComponents/Scripts/CollectTilemapSourcesCache2d.cs index 8d2c8d4..762ac9e 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 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