Explorar el Código

Added setting to change the generated terrain GameObject layer

James Peret hace 2 años
padre
commit
b3c5435c86
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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)