- Home /
SelectionGrid parameters
var strings = new String[10]; strings[0]="hullo"; strings[2]="hi"; strings[6]="hiagain"; GUI.SelectionGrid(Rect(5,Screen.height-160, Screen.width-260, 155), strings, 5);
I am trying to enter the parameters for this function:
static function SelectionGrid (position : Rect, selected : int, texts : string[], xCount : int) : int
I am getting this error:
Assets/MyScripts/CustomGUI.js(60,34): BCE0023: No appropriate version of 'UnityEngine.GUI.SelectionGrid' for the argument list '(UnityEngine.Rect, (String), int)' was found.
What am I doing wrong? I think that I am declaring a string array and passing it to the parameters, so why does it not recognize it as a string[]?
Answer by Eric5h5 · Nov 17, 2010 at 01:40 AM
You're only giving it:
Rect, String[], int
but it needs:
Rect, int, String[], int
Your answer
Follow this Question
Related Questions
How do I get a list to randomly select.... 1 Answer
Remove Numbers from a String 2 Answers
Get values from long string (C#) 5 Answers
Array strings/Loops problem 2 Answers