Да,был,трианг.Сам уже нашёл(через меню переходит на он-лине справку).
using UnityEngine;
using System.Collections;
public class main : MonoBehaviour {
public int countBlock;
public GameObject box;
// Use this for initialization
void Start () {
int i;
for(i=0;i<countBlock;i++){
box = new GameObject("box"+i.ToString());
box.AddComponent("BoxCollider");
box.AddComponent("MeshFilter");
//box.transform.position=new Vector3(Random.value*40-20,1,Random.value*40-20);
box.transform.position=new Vector3(3,1,3);
}
}
// Update is called once per frame
void Update () {
}
}
Как кодом материал прикрепить и тип меша??а то в справке нету.