06 February 2016
I probably need to provide some easy methods for creating volumes at runtime in future, but for now there's a little more work you have to do.
Continuing on from the correct code you already have, you'll need to do something like the following:
// Set the size on the frame
var frame = volume.GetCurrentFrame();
frame.XSize = volume.XSize;
frame.YSize = volume.YSize;
frame.ZSize = volume.ZSize;
// Resize the voxel array
frame.Voxels = new Voxel[frame.XSize*frame.YSize*frame.ZSize];
// Recreate all chunks
Note that this will clear all voxels in the volume. Also, I haven't actually tested this, it's off the top of my head.
You can take a look at EditorResizeWindow.cs to see how resizing works in the editor.
Let me know if you need more help!
Last edited 14 February 2016