Debug.Log ("hey! you clicked on: " + customerSearchResult );
This line is working perfectly fine in this code-
```
-
void OnGUI()
{
if(length!=null){
// GUILayout.BeginScrollView();
scrollViewVector = GUILayout.BeginScrollView(scrollViewVector, GUILayout.Width(100), GUILayout.Height(100));
//GUILayout.Label(innerText);
for (int i=customerSearchResult.Length-1; i>=0; i--){
if (GUILayout.Button(customerSearchResult[i], "label") ) {
Debug.Log ("hey! you clicked on: " + customerSearchResult[i] );
}
}
GUILayout.EndScrollView();
}
}*
* *whereas the same line is not working from the code below -* *
- void OnGUI()
{
if(length>0){
int forGuiArrangement = 1;
scrollViewVector = GUI.BeginScrollView (new Rect (260, 50, 100, 100), scrollViewVector, new Rect (0, 0, 400, 400));
for (int i=customerSearchResult.Length-1; i>=0; i–){
forGuiArrangement = forGuiArrangement+1;
if (GUI.Button(new Rect(20, 10forGuiArrangement, 150, 100), customerSearchResult[i], “label”)) {
Debug.Log ("hey! you clicked on: " + customerSearchResult[i] );
}
}
GUI.EndScrollView();
}
}
```
What is wrong that i am doing ??