Hello, I’ve searched the internet for days and I still haven’t found an answer. The problem is that I want to make many different lists (potentially hundreds), but I want to create them each with a name that fits their categories. The reason I am doing this is because I am developing a game with procedural generation, in which their will be rooms with different exits, sizes, and types.
listName = “”;
if (exitUp)
{
listName += “N”;
}
if (exitDown)
{
listName += "S";
}
if (exitLeft)
{
listName += "E";
}
if (exitRight)
{
listName += "W";
}
// The above is the exit denotation
listName += sizeOfRoom.x;
listName += ",";
listName += sizeOfRoom.y;
// The above adds the x value, a comma, and a y value of the room
listName += roomType;
// The above add the roomType text
For example, if I was looking at a room with exits up and down, a size of 8 by 4, and a type of StandardRoom, then listName would equal the string “NS8,4StandardRoom”. If I could create a List with that name, and add all rooms that fit those parameters into it, I could then search for a List with that name when I try to spawn a specific room with those qualities.
In short, if I could somehow change the text of the string into the title of a list, that would be very beneficial.
NOTE: I have looked into unity dictionaries, and I want to avoid those if possible. The problem with them is that it becomes incredibly hard to view dictionary entries, and displaying them in the inspector is a nightmare. A list, meanwhile, can be shown and modified in the inspector.