private void CreatePreviewMesh(VoxelData data)
        {
            ShowWait();

            PreviewVoxelMesh pm = new PreviewVoxelMesh(data);

            previewMesh = pm.mesh;

            ClearWait();
        }
Exemplo n.º 2
0
        private void OnEnable()
        {
            VoxelData vd = (VoxelData)target;

            preview         = new PreviewRenderUtility();
            previewMaterial = new Material(Shader.Find("Mobile/Diffuse"));

            //VoxelData data = new VoxelData(vd);
            PreviewVoxelMesh pm = new PreviewVoxelMesh(vd);

            previewMesh = pm.mesh;
            //previewTexture = pm.texture;
            //previewMaterial.mainTexture = previewTexture;
        }