Created
April 15, 2017 03:06
-
-
Save twobob/ce800e96b76e8949ee587fb4f19f2d17 to your computer and use it in GitHub Desktop.
This file contains hidden or 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; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class PolyPri : MonoBehaviour | |
{ | |
void Start () | |
{ | |
MeshFilter[] myMeshs = FindObjectsOfType (typeof(MeshFilter)) as MeshFilter[]; | |
List<MeshFilter> myMeshList = new List<MeshFilter> (); | |
for (int i = 0; i < myMeshs.Length; i++) { | |
myMeshList.Add (myMeshs [i]); | |
} | |
var lengths = from element in myMeshList | |
orderby element.mesh.vertexCount | |
select element; | |
foreach (MeshFilter value in lengths) { | |
print(value.gameObject.name + " " + value.mesh.vertexCount); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment