- Home /
Draw Call Stat inside a GUIText?
Hey guys I am trying to put a GUIText in my scene and test my custom batching script on my models but the problem is that im trying to do this on a tablet...
I want to put the draw calls stat inside a GUIText of some sort and view it via. real time when the game is being played on my tablet.
Any help would greatly be appreciated. Thanks!
What are you having trouble with? Your question heading suggest you're having trouble writing to a GUIText (which is easy, and a perfectly fine way to debug.) But is the real problem how to look up # of draw calls?
No i want to put the draw calls in to GUIText so i can look at how many draw calls i have on tablets ins$$anonymous$$d of on pc at run time. i know when i press play i can view the draw calls on the pc through the gizmo but its hard to tell on tablets because well its on the tablet ... lol i was just wonder if there was a way to view the draw calls through a GUIText... I cant seem to find anything relating to the draw calls in the unity scripting reference
Yes, it is very easy to write the draw calls into a guiText on a tablet: StatText.guiText.text=""+calls;
The tricky part is computing the variable calls
, which, as Eric writes below, has no built-in way to get.
For things you can compute, writing to a guiText works fine.
Answer by Eric5h5 · Jun 15, 2013 at 01:12 AM
There is no access to draw call information in a build. However there's no difference between draw calls in the editor and a build, so you can just look at the draw call info in the editor.
Well the reason im asking is the game i am build has a very complex dynamic batching scipt that batches all the models textures on screen into a empty game object to dynamically optimize the players game performance to on the fly. The type of game im building is an rts and requires the player to build buildings in the 3D environment.
When you drag out a building on my terrain it breaks the built in dynamic batching for the model and creates excessive draw calls when building. This being known forced me to create a custom batcher in which it batches say 5 same type buildings and put them into a empty game object resulting from 5 draw calls to 1 draw call.
I guess all have to deal with it if what you say is true and i can't put draw call info into a GUIText. Its not really a problem, but rather than an annoyance. Thanks for your help though! :)
Your answer
Follow this Question
Related Questions
Can you call OnDrawGizmos manually? 0 Answers
Network Usage Statistics 1 Answer
Using Handles in EditorWindow 0 Answers
How to dynamically access to the inside of the Stats value in Unity3D 0 Answers
RectTransform Anchor gizmos missing 5 Answers