- Home /
Will not create the array
ok so the code i have below doesn't give any compiler errors is just wont give me my variable to create the number of arrays i want so to speak i have attached pictures to try and help you understand what i mean.
code
var menuItems : MenuItem[];
var currentMenuItem : int = 0;
function Update()
{
if(Input.GetAxisRaw("Vertical") > 0.9)
{
currentMenuItem--;
if(currentMenuItem < 0) currentMenuItem = 0;
}
else if (Input.GetAxisRaw("Vertical") < -0.9)
{
currentMenuItem++;
if(currentMenuItem >= menuItems.length) currentMenuItem =
menuItems.length - 1;
} }
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
problem with FindWithTag 2 Answers
Please translate short script to Java from C#? 1 Answer
Access variables, objects in array in another script? 2 Answers
Ladder script not working? 0 Answers