Directory structure in BinaryData

Hi,

Beside the very handy aspect of BinaryData, my only complaint is that only filenames are used for generating variable names, regardless of their relative path. This makes it impossible to use a directory structure to organise assets and use them more dynamically from code.

Consider the following hypothetical project:

Project
  Assets
    Themes
      Light
        font.otf
        background.png
      Dark
        font.otf
        background.png
  Source
  Project.jucer

IIRC, the Projucer will add a number suffix for identical filenames.

It’d be so much easier if the names ended up as:

const char* namedResourceList[] =
{
    "Assets_Themes_Light_font_otf",
    "Assets_Themes_Light_background_png",
    "Assets_Themes_Dark_font_otf",
    "Assets_Themes_Dark_font_otf",
}
2 Likes