Hi everyone, How do you reference a inherited value to a GUILayout.box? I keep telling GUILayout.box to display the inherited value but I keep getting this error system.collections.generic.list does not contain a definition for ‘Value’ and no extension method.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class ExampleScript : MonoBehaviour {
[System.Serializable]
public class ValueClass
{
public int Value = 0;
}
public List<ValueClass> Boxs;
Void OnGUI(){
for(int i = 0; i <Boxs.Count;i++)
//error system.collections.generic.list <exampleScript.ValueClass> does not containa definition for 'Value' and no extension method
GUILayout.Box(Boxs.Value*,GUILayout.Width(25), GUILayout.Height(25));*
}