예제 #1
0
    // 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);
    }
예제 #2
0
        void Start()
        {
            AutoRefresh = false;
            voxelMaterials = GetComponent<VoxelMaterials>();

            //create chunks container
            chunckContainer = new GameObject("Chunks");
            chunckContainer.transform.parent = this.gameObject.transform;
        }