I want to initialize a list to a certain size
corridors = new List<Corridor>(new Corridor[rooms.Length - 1]);
As I've done here but I then want to add objects to the end of that list while leaving space between. so if outputted it would look like
[,,,,,,,,,,Corridor()] or
[Corridor(),Corridor(),Corridor(),Corridor(),,,,,,Corridor()]
I have tried this way already and its not working for me. I want to do it this way because the corridors that exist at the initialized size are all standard one and I'd like to be able to loop through those while being able to add special ones at the end.
What would be the best way about doing this?