Is there a way to insert an if statement for a Selection Grid? When I try to put in an if statement for this selection grid I get this error cannot implicitly convert type “int” to bool.
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
public int intTest;
public int selectionGridInt = 0;
public string[] selectionStrings = {"Grid 1", "Grid 2", "Grid 3", "Grid 4"};
void update(){
if(selectionGridInt = 1){//error cannot implicitly convert type "int" to bool
++intTest;
}
}
void OnGUI () {
selectionGridInt = GUI.SelectionGrid (new Rect (25, 25, 100, 60), selectionGridInt, selectionStrings, 1);
}
}