using System.Collections; using System.Collections.Generic; using UnityEngine; public class LoadModelData : MonoBehaviour { public List a; public List b; public Mesh mesh; // Start is called before the first frame update void Start() { mesh = this.gameObject.GetComponent().mesh; Debug.LogError(mesh.vertices.Length); a = new List(mesh.vertices); string infoString = string.Empty; for (int i = 0; i < 1000; i++) { infoString += mesh.vertices[i].x +","+ mesh.vertices[i].y + ","+mesh.vertices[i].z +":"; } Debug.LogError(infoString); infoString = string.Empty; Debug.LogError(mesh.uv.Length); for (int i = 0; i < 1000; i++) { infoString += mesh.uv[i].x +","+ mesh.uv[i].y+":"; } Debug.LogError(infoString); infoString = string.Empty; Debug.LogError(mesh.triangles.Length); for (int i = 0; i < 1000; i++) { infoString += mesh.triangles[i] + ":"; } b = new List(mesh.triangles); Debug.LogError(infoString); } }