I'm mapping data to layers. I'm doing a step-sequencer where different instruments are on different layers. The data is stored by index, so Voice0, Voice1, etc. I am hoping to support a standard input format with this format. When I load the data in, I load from the top layer, which I know the name of, and wanted to address subsequent layers relative to that one layer.
Obviously there are many ways to do this, but the most instinctive one was to only need to know the Name of that top layer, ask for it's number (as it may change as I develop the game), and then add the data layer by layer relative to that first layer.
I'm not saying there are many ways to work around this, but the most obvious one was to just know about that first Name, and then address everything relative to the layers Number. Retrieving the layers number at runtime seems the obvious choice,