I made many models, but I did not remember the poly count of any of them, how can I quickly find out the number of polygons in each of these?
-Edit-
I made a Polygon counter script; it generates a txt file containing polygon counts of all referenced game objects mesh inside the assets file.
using UnityEngine;
using System.IO;
using System.Collections.Generic;
using System.Linq;
public class PolyCount_Counter : MonoBehaviour
{
public StreamWriter swriter;
public GameObject[] targetObjs;
public List<Vector3> currentMeshBaseVerticesList;
// Execute in play mode.
[ContextMenu("WRITE ALL REFERENCED OBJECTS MESH POLYCOUNTS")]
void inputWriter() // write every keycodes to input.txt file in order
{
string path = "Assets/TotalVerticlesAndTrianglesOfAllModels.txt";
FileStream fs = new FileStream(path, FileMode.OpenOrCreate);
swriter = new StreamWriter(fs);
for (int i = 0; i < targetObjs.Length; i++)
{
int triangleCount = targetObjs*.GetComponent<MeshFilter>().sharedMesh.triangles.Length / 3;*
int verticleCount = targetObjs*.GetComponent().sharedMesh.vertexCount;*
targetObjs*.GetComponent().sharedMesh.GetVertices(currentMeshBaseVerticesList);*
currentMeshBaseVerticesList = currentMeshBaseVerticesList.Distinct().ToList();
Debug.Log(i + ". " + targetObjs*.name + ", Vertices(Base) : " + currentMeshBaseVerticesList.Count + ", Vertices(In Unity Editor) : " + verticleCount + ", Triangles : " + triangleCount + ".
");*
swriter.WriteLine(i + ". " + targetObjs*.name + ", Vertices(Base) : " + currentMeshBaseVerticesList.Count + ", Verticles(In Unity Editor) : " + verticleCount + ", Triangles : " + triangleCount + ".
");*
}
swriter.Close();
}
}