diff --git a/Examples/Grid2D/CurrentRoomDetection/Scripts/CurrentRoomDetectionPostProcessing.cs b/Examples/Grid2D/CurrentRoomDetection/Scripts/CurrentRoomDetectionPostProcessing.cs index 2a28811b..e5962f5f 100644 --- a/Examples/Grid2D/CurrentRoomDetection/Scripts/CurrentRoomDetectionPostProcessing.cs +++ b/Examples/Grid2D/CurrentRoomDetection/Scripts/CurrentRoomDetectionPostProcessing.cs @@ -35,7 +35,7 @@ public override void Run(DungeonGeneratorLevelGrid2D level) private void AddFloorCollider(GameObject floor) { var tilemapCollider2D = floor.AddComponent(); - #if UNITY_2021_3 + #if UNITY_2022_1_OR_NEWER tilemapCollider2D.compositeOperation = Collider2D.CompositeOperation.Merge; #else tilemapCollider2D.usedByComposite = true; diff --git a/Examples/Grid2D/Resources/Docs/CurrentRoomDetection.cs b/Examples/Grid2D/Resources/Docs/CurrentRoomDetection.cs index b815688a..e504e489 100644 --- a/Examples/Grid2D/Resources/Docs/CurrentRoomDetection.cs +++ b/Examples/Grid2D/Resources/Docs/CurrentRoomDetection.cs @@ -29,7 +29,7 @@ public override void Run(DungeonGeneratorLevelGrid2D level) private void AddFloorCollider(GameObject floor) { var tilemapCollider2D = floor.AddComponent(); - #if UNITY_2021_3 + #if UNITY_2022_1_OR_NEWER tilemapCollider2D.compositeOperation = Collider2D.CompositeOperation.Merge; #else tilemapCollider2D.usedByComposite = true; diff --git a/Examples/Grid2D/Resources/Docs/CustomizeRoomTemplates/CustomTilemapLayersHandlerExample.cs b/Examples/Grid2D/Resources/Docs/CustomizeRoomTemplates/CustomTilemapLayersHandlerExample.cs index 6b52c86c..7a104389 100644 --- a/Examples/Grid2D/Resources/Docs/CustomizeRoomTemplates/CustomTilemapLayersHandlerExample.cs +++ b/Examples/Grid2D/Resources/Docs/CustomizeRoomTemplates/CustomTilemapLayersHandlerExample.cs @@ -51,7 +51,7 @@ protected GameObject CreateTilemapGameObject(string name, GameObject parentObjec protected void AddCompositeCollider(GameObject tilemapGameObject, bool isTrigger = false) { var tilemapCollider2D = tilemapGameObject.AddComponent(); - #if UNITY_2021_3 + #if UNITY_2022_1_OR_NEWER tilemapCollider2D.compositeOperation = Collider2D.CompositeOperation.Merge; #else tilemapCollider2D.usedByComposite = true; diff --git a/Runtime/Grid2D/DungeonGenerator/DungeonTilemapLayersHandlerGrid2D.cs b/Runtime/Grid2D/DungeonGenerator/DungeonTilemapLayersHandlerGrid2D.cs index 57de1370..3b24bd6f 100644 --- a/Runtime/Grid2D/DungeonGenerator/DungeonTilemapLayersHandlerGrid2D.cs +++ b/Runtime/Grid2D/DungeonGenerator/DungeonTilemapLayersHandlerGrid2D.cs @@ -42,7 +42,7 @@ protected GameObject CreateTilemapGameObject(string name, GameObject parentObjec protected void AddCompositeCollider(GameObject gameObject) { var tilemapCollider2D = gameObject.AddComponent(); - #if UNITY_2021_3 + #if UNITY_2022_1_OR_NEWER tilemapCollider2D.compositeOperation = Collider2D.CompositeOperation.Merge; #else tilemapCollider2D.usedByComposite = true; diff --git a/Tests/Runtime/Scenes/TilemapLayersStructure/CustomTilemapLayersHandler.cs b/Tests/Runtime/Scenes/TilemapLayersStructure/CustomTilemapLayersHandler.cs index 97b4661d..d05a00ad 100644 --- a/Tests/Runtime/Scenes/TilemapLayersStructure/CustomTilemapLayersHandler.cs +++ b/Tests/Runtime/Scenes/TilemapLayersStructure/CustomTilemapLayersHandler.cs @@ -43,7 +43,7 @@ protected GameObject CreateTilemapGameObject(string name, GameObject parentObjec protected void AddCompositeCollider(GameObject gameObject) { var tilemapCollider2D = gameObject.AddComponent(); - #if UNITY_2021_3 + #if UNITY_2022_1_OR_NEWER tilemapCollider2D.compositeOperation = Collider2D.CompositeOperation.Merge; #else tilemapCollider2D.usedByComposite = true;