// Use this for initialization void Start() { voxelEngine = GetComponent<VEngine>(); materials = GetComponent<VoxelMaterials>(); voxelEngine.AddVoxelAt(new Vector3(0, 0, 0), new VoxelType(materials.materials[0])); voxelEngine.AddVoxelAt(new Vector3(1, 1, 1), new VoxelType(materials.materials[0])); voxelEngine.SetAutoRefresh(true); }
void Start() { AutoRefresh = false; voxelMaterials = GetComponent<VoxelMaterials>(); //create chunks container chunckContainer = new GameObject("Chunks"); chunckContainer.transform.parent = this.gameObject.transform; }