Hello, how could i fix my PFS downgrade problem ? When I am running the game FPS are stable around 66-70, but as soon as i hit my first selection grid FPS are going down to 20.
Here is a piece of code with my grid.
private var selGridInt : int = 0;
var selStrings : String[] = ["Skill 1", "Skill 2", "Skill 3"];
var showSelectionGrid : boolean = false;
function Start () {
selGridInt = selGridInt-1;
}
function ... () {
if (GUILayout.Button("Skills")) {
showSelectionGrid = !showSelectionGrid;
}
}
function ShowSelectionGrid () {
if (showSelectionGrid == true) {
selGridInt = GUI.SelectionGrid (Rect (125, 125, 100, 150), selGridInt, selStrings, 1);
}
if (selGridInt == 0) {
Debug.Log("Selection grid = " + 0);
}
function OnGUI () {
ShowSelectionGrid();
....();
}
My guess is that the first clicked grid is somehow interfering with already opened GUI.