Hello, Example: Code (CSharp): public Instance(string Name, Room room) { name = Name; rooms.Add(room); } public Instance(string Name, Room room1, Room room2, Room room3) { name = Name; rooms.Add(room1); rooms.Add(room2); rooms.Add(room3); } Lets say I wanted to add multiple rooms, but I don't want to add "Room room1, Room room2, Room room3" as it will be quite messy if you wanted to ask for 20 rooms or whatever. How would you handle this?
Ended up using the examples below - feel free to comment if you know a better way. Code (CSharp): public Instance(string Name, List <Room> Rooms) { name = Name; rooms = Rooms; } Code (CSharp): void CreateInstances() { instances.Add(new Instance("Building", new List<Room> { new Room( new List<Character> { CD.room[1], CD.room[1] } ), new Room( new List<Character> { CD.room[1], CD.room[2] } ) } ) ); } Don't worry about the actual names of the vars