- Home /
View triangle count of a scene?
This one's probably a kind of noobish question, but I've looked all over and can't seem to find an answer. Does Unity have a feature or a script to view the total number of triangles in a given scene? I found this script: http://wiki.unity3d.com/index.php?title=PrintPolyCount but it only shows the triangles on the object it's attatched to, which isn't very helpful.
Answer by Screenhog · Nov 28, 2012 at 11:37 PM
Have you looked at the Stats? When playing a game in the Editor, click the Stats button in the top right. It'll give the number of tris that are being rendered/calculated.
It's not exactly what you're looking for, though. Any particular reason you want to know all triangles in the whole scene?
I hadn't seen the Stats button before, but that's exactly what I'm looking for. I was wanting to know the triangles of the whole scene because I don't have Unity Pro, so I don't have the occlusion culling feature and I'm trying to keep things under a certain triangle count. Thanks for your help!
No problem!
Be aware, though, that the number of tris and vertices that it shows may not actually be accurate to what you expect, for a number of reasons:
Certain lights reacting with certain shaders can make an object have double or triple the number of draw calls. When this happens, the number of tris that Unity will report that object to have will also double or triple.
If you have an object that's partly on-screen, but partly off, it will still compute the off-screen faces, and I believe that number gets reported.
What Unity tells you is the number of triangles it has to compute, which is the more useful number in the end. However, it's weird at first to see a cube that you know has 12 faces showing up as more than that, so heads up.
That's really helpful to know, thanks so much for the help! I'm just using the simple mobile shaders, so hopefully that won't skew the numbers or anything.
Those shaders are designed to have as few draw calls as possible (1 usually, never more than 2), so you should be fine there.
Your answer
![](https://koobas.hobune.stream/wayback/20220613084649im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Generated Mesh Triangles not Being Made/Visible? 1 Answer
Problem drawing a mesh with Graphics.DrawMeshNow 1 Answer
Best way to render a character with extra accessories? 1 Answer
To what extent can the tree system be used instead of the details system 0 Answers
Failed setting triangles in my mesh 1 Answer