Hi everyone, I have encountered a pushing guiclips more than popping error and I need help figuring out what’s causing this. Also What I’m trying to do is replicate toggle buttons with normal buttons since I’ve been having a lot of errors with toggle buttons.
using UnityEngine;
using System.Collections;
public class exampleScript: MonoBehaviour {
[System.Serializable]
public class BoolValueClass
{
public bool BoolValue = false;
public BoolValueClass(bool start_value2)
{
BoolValue = start_value2;
}
}
public List<BoolValueClass> ExampleList = new List<BoolValueClass>();
void OnGUI(){
Text = new string(){"Bool1","Bool2","Bool3","Bool4"};
GUILayout.BeginArea(new Rect(Screen.width/3.5f, Screen.height/4,Screen.width,
Screen.height));
scrollPosition = GUILayout.BeginScrollView (scrollPosition, GUILayout.Width (175), GUILayout.Height (125));
for (int a = 0; a < Text.Length; a++)
GUILayout.Label(Text[a], GUILayout.Width(175), GUILayout.Height(25));
GUILayout.BeginArea(new Rect(150, 0,Screen.width, Screen.height));
for (int b = 0; b <ExampleList.Count; b++){
if(ExampleList**.BoolValue = false){**
** if (GUILayout.Button(“+”, GUILayout.Width(25), GUILayout.Height(25)))**
{
ExampleList**.BoolValue = true;**
}
** }**
__ if(ExampleList**.BoolValue = true){
if (GUILayout.Button(“-”, GUILayout.Width(25), GUILayout.Height(25)))
{__
__ExampleList.BoolValue = false;
}
}
}
GUILayout.EndArea();GUILayout.EndArea();GUILayout.EndArea();**__
}