Reading draw call count from a script

I’m writing a debug menu for my iOS game and want to display draw call count there, but can’t seem to find a way to read it from a script. I know about iOS profiler but it outputs draw call count to the console and I want to display it in-game.

Look at the code for iPhone_Profiler.cpp. This will show you how the built in profiler records the data. Then look at:

which tells you how ObjectiveC or C++ code can call into Unity, using UnitySendMessage. So, all you need to do is push the draw call count from the c++ side into the Unity script code. Sorted :-).