Hi everyone, I have been trying to create a script where you can use the scrollwheel to scroll through an array. But for some reason I get this error cannot convert type bool to type float.Any idea how to fix this?
public string[] someStrings;
public string currentSomeString;
void Start(){
someStrings = new string[]{"text1","text2","text3"};
}
void Update () {
for (int a = 0; a < someStrings.Length; a++){
if(Input.GetAxis("Mouse ScrollWheel")){
currentSomeString = someStrings[a];
}
}
}
↧