Hi.
I have 1500 existing objects. Every object has a script attached. Every script also has an OnGUI() section. I am using it to draw text labels above each objects. I already did some optimization but for some strange reason, its always slow as hell. Just for trying out I did a return; immediately after entering the sub:
void OnGUI() {
return;
}
But still, I have only 25 fps. Only commenting the while OnGui block out and it gets up to 110 fps again...
Is this a bug in Unity or is the only way implementing labels over objects by iterating every object in the main class, checking if it is visible, and then drawing the label? This would make the whole thing very complex and... uncool....
Is there a way to really disable the OnGUI calls as long as the object is not visible?