i got this error:
InvalidOperationException: Operation is not valid due to the current state of the object
System.Collections.Stack.Pop ()
UnityEngine.GUIClip.Pop ()
UnityEngine.GUI.EndGroup ()
UserInterface+FPSTab$27+$.MoveNext () (at Assets\Scripts\Application\MainGame\GUI\UserInterface.js:132)
the warning fires when clicking a button which shows label that holds current fps
here is the code
function FPSTab(){
GUI.BeginGroup(Rect(xFPSPosition,0,95,30));
GUI.Label(Rect(10,5,40,25),FPS.returnFPS());
if(GUI.Button(Rect(50,5,40,25),"FPS")){
if(bFPSVisible){
var t = 0.0;
while (t<1.0){
t+=Time.deltaTime *(1.0/0.5);
xFPSPosition=Mathf.Lerp(xFPSPosition,-45.0,t);
yield;
}
bFPSVisible=false;
} else {
t = 0.0;
while (t<1.0){
t+=Time.deltaTime *(1.0/0.5);
xFPSPosition=Mathf.Lerp(xFPSPosition,0,t);
yield;
}
bFPSVisible=true;
}
}
GUI.EndGroup();
}