Closed Spydrouge closed 9 years ago
I have gotten the conversion to work. Lake is asking me to 'dumb down' the interface. I need to make a plan for how to do that.
Personally, one of the things that really gets me about how all this works is that I cannot repeatedly reload block data and tweak parameters (like chunks to load or vertical offset) to see the effects that has on the vdb. The reason for this is that the vdb has severe trouble unloading or deleting itself. (It is almost impossible to delete a vdb from within Unity, even after its corresponding .asset file has been destroyed. I want to spend a little bit of time figuring out why this is the case, and if there is possibly a way around it. I feel it could eliminate a great deal of confusion.
The problem is entirely that Cubiquity does not want to work with the .vdb because the file already exists. Two things are going to make everything prettier...
1) Test if the file already exists so we don't corrupt the data (which happens if we just run things the way they are now; the vdb/Voxel Database.asset stop working) 2) If the file already exists, determine what to do... Delete it?
Question I ask myself: What opens the .vdb file and ends up leaving it open?
Closing Issue and opening new one for new problems
The first broad task for this project is that Cubiquity should be able to read in Minecraft files (or Substrate files, as Substrate is the C library that we're working with for the saving/loading of Minecraft style files)
Task List
Initial Look Around
Baby Project
Custom Editors
I feel the need to write a few notes I've come upon in this area as I work.
Slotting in a File Name
Instead of trying to understand the whole of Cubiquity's code and how unity does editors, let's start by just finding out how Cubiquity slots in its file name at edit time.
I am currently looking at ColoredCubesVolume.cs (which is the box under which Cubiquity's file name info shows up) which is a Script under Cubiquity->Scripts (it is not specifically in 'Editor'). It derives from Volume, which Derives from MonoBehavior
if UNITY_EDITOR #endif contains a cute sanity check where cubiquity attempts to determine they know how Unity's editor scripts work ;)
NONE of this tells us about the ADD/PAINT/DELETE/SETTINGS tabs however. Let's Search in Files for "Paint". We come upon this class:
Independent Edit Window
Q: Which ColoredCubesVolume object will I be popping this data into?
A: None! I'm creating a vdb file. If I have to create a ColoredCubesVolume object along the way, then I can destroy it. My output is a new VolumeData Unity object and its corresponding .vdb file.