-
-
Save todorok1/8b3f13011a5c4c2bee966556dd06e767 to your computer and use it in GitHub Desktop.
メッシュの頂点情報を出力するサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
/// <Summary> | |
/// メッシュの頂点を出力するクラスです。 | |
/// </Summary> | |
public class VertexChecker : MonoBehaviour | |
{ | |
void Start() | |
{ | |
MeshFilter filter = gameObject.GetComponent<MeshFilter>(); | |
Debug.Log($"頂点の数は {filter.mesh.vertices.Length} 個です。"); | |
foreach (Vector3 pos in filter.mesh.vertices) | |
{ | |
Debug.Log(pos); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment