浏览代码

Added ability to setup the generated mesh GameObject tag

James Peret 2 年之前
父节点
当前提交
982b8c099f
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Runtime/MarchingCubes4.cs

+ 2 - 0
Runtime/MarchingCubes4.cs

@@ -20,6 +20,7 @@ namespace KairoEngine.TerrainEngine
         public Material material;
         public GameObject parent;
         [Layer] public int terrainLayer;
+        [Tag] public string terrainTag;
         
 
         private MeshFilter meshFilter;
@@ -139,6 +140,7 @@ namespace KairoEngine.TerrainEngine
             meshFilter.mesh = mesh;
             meshCollider.sharedMesh = mesh;
             target.layer = terrainLayer;
+            target.tag = terrainTag;
         }
 
         private void ScheduleJob(Vector3 initialPosition)