- 429 名前:名前は開発中のものです。 mailto:sage [2016/02/02(火) 18:51:38.07 ID:z4AT8/Lx.net]
- private void CreateSphere()
{ MeshFilter[] childList = GetComponentsInChildren<MeshFilter>(); foreach (MeshFilter mesh in childList) { Vector3[] vec = Application.isPlaying ? mesh.mesh.vertices : mesh.sharedMesh.vertices; HashSet<Vector3> vset = new HashSet<Vector3> (vec); foreach (var v in vset) { Debug.Log (v); GameObject pointObj = GameObject.CreatePrimitive(PrimitiveType.Sphere); pointObj.transform.parent = mesh.transform; pointObj.transform.localPosition = Vector3.zero; pointObj.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f); pointObj.transform.localPosition = v;//ローカルでそのまま指定 } } }
|

|