размер массива определяется у инспектора Unity. Ошибка - < /p>
error 'item' не содержит определения для «длина» < /p>
< /blockquote>
Код: Выделить всё
public class Item : System.Object
{
public string name;
public int Radius = 1;
public GameObject obj;
}
public class Gen : MonoBehaviour {
public Item[] Items;
int iNum = Items.Length; // gives me an error
}
Подробнее здесь: https://stackoverflow.com/questions/403 ... f-an-array
Мобильная версия