Prechádzať zdrojové kódy

Added setting to change the generated terrain GameObject layer

James Peret 2 rokov pred
rodič
commit
b3c5435c86
1 zmenil súbory, kde vykonal 2 pridanie a 0 odobranie
  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)