Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created January 1, 2021 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todorok1/8b3f13011a5c4c2bee966556dd06e767 to your computer and use it in GitHub Desktop.
Save todorok1/8b3f13011a5c4c2bee966556dd06e767 to your computer and use it in GitHub Desktop.
メッシュの頂点情報を出力するサンプル
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