Any reason not to have duplicate names in separate Resources folders?

Is there a reason not to have duplicate names, provided they aren’t in the same directory?

For example, say I have three text files in the Resources folder which are all named ‘Story’, but which are all in different directories, as shown below.

  • Resources/Chapter One/Story.txt
  • Resources/Chapter Two/Story.txt
  • Resources/Chapter Three/Story.txt

I haven’t had any problems with this so far, but given my inexperience and the fact that I haven’t seen anyone else do this, I can’t shake the feeling that this is going to come apart at the seams somehow.

I’m aware that this may be generally inadvisable from a development standpoint since it could lead to confusion.

I think what you’re doing is fine, since you can load them with unique names such as

Resources.Load("Chapter One/Story.txt");

You’d get yourself into trouble if they had the same filepath under different Resources folders, such as:

  • Abc/Resources/Story.txt
  • Def/Resources/Story.txt

because Resources.Load(“Story.txt”) would be ambiguous.