Pārlūkot izejas kodu

Added setting to change the generated terrain GameObject layer

James Peret 2 gadi atpakaļ
vecāks
revīzija
b3c5435c86
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      Runtime/MarchingCubes4.cs

+ 2 - 0
Runtime/MarchingCubes4.cs

@@ -19,6 +19,7 @@ namespace KairoEngine.TerrainEngine
         public bool flatShaded;
         public Material material;
         public GameObject parent;
+        [Layer] public int terrainLayer;
         
 
         private MeshFilter meshFilter;
@@ -137,6 +138,7 @@ namespace KairoEngine.TerrainEngine
             mesh.RecalculateNormals();
             meshFilter.mesh = mesh;
             meshCollider.sharedMesh = mesh;
+            target.layer = terrainLayer;
         }
 
         private void ScheduleJob(Vector3 initialPosition)