public void Test() { var csg = new CSG.CSG(); csg.Construct(A.GetComponent<MeshFilter>().sharedMesh, A.transform, 0); var newMesh = csg.Test().ToMesh(); Result = new GameObject("Test"); Result.AddComponent<DefaultObject>(); var meshFilter = Result.AddComponent<MeshFilter>(); meshFilter.sharedMesh = newMesh; var renderer = Result.AddComponent<MeshRenderer>(); renderer.sharedMaterials = new Material[] { A.GetComponent<MeshRenderer>().sharedMaterial, B.GetComponent<MeshRenderer>().sharedMaterial }; }
public void Test() { var csg = new CSG.CSG(); csg.Construct(A.GetComponent <MeshFilter>().sharedMesh, A.transform, 0); var newMesh = csg.Test().ToMesh(); Result = new GameObject("Test"); Result.AddComponent <DefaultObject>(); var meshFilter = Result.AddComponent <MeshFilter>(); meshFilter.sharedMesh = newMesh; var renderer = Result.AddComponent <MeshRenderer>(); renderer.sharedMaterials = new Material[] { A.GetComponent <MeshRenderer>().sharedMaterial, B.GetComponent <MeshRenderer>().sharedMaterial }; }
// Token: 0x060041D1 RID: 16849 RVA: 0x0014E730 File Offset: 0x0014CB30 public void Test() { CSG.CSG csg = new CSG.CSG(); csg.Construct(this.A.GetComponent <MeshFilter>().sharedMesh, this.A.transform, 0); Mesh sharedMesh = csg.Test().ToMesh(); this.Result = new GameObject("Test"); this.Result.AddComponent <DefaultObject>(); MeshFilter meshFilter = this.Result.AddComponent <MeshFilter>(); meshFilter.sharedMesh = sharedMesh; MeshRenderer meshRenderer = this.Result.AddComponent <MeshRenderer>(); meshRenderer.sharedMaterials = new Material[] { this.A.GetComponent <MeshRenderer>().sharedMaterial, this.B.GetComponent <MeshRenderer>().sharedMaterial }; }