I got this strange error and cant figure how to fix it?
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Loot : MonoBehaviour {
public float lootwindowheight = 90;
public float Buttonheight = 40;
public float Buttonwidth = 40;
private List _lootItems;
private float OFF_SET = 10;
private const int LOOT_WINDOW_ID = 0;
private Rect _lootWindow = new Rect(0,0,0,0);
// Use this for initialization
void Start () {
_lootItems = new List <Item>();
Populate();
}
// Update is called once per frame
void Update () {
}
void OnGUI() {
_lootWindow = GUI.Window(LOOT_WINDOW_ID, new Rect(OFF_SET, Screen.height - (OFF_SET + lootwindowheight), Screen.width - (OFF_SET * 2), lootwindowheight), LootWindow, "Loot Window");
}
private void LootWindow(int id) {
for(int cnt = 0; cnt < _lootItems.Count; cnt++) {
GUI.Button(new Rect(Buttonwidth * cnt, 0, Buttonwidth, Buttonheight), cnt.ToString());
}
}
private void Populate() {
for(int cnt = 0; cnt < 25; cnt++)
_lootItems.Add(new Items());
}
}