Dener
New Member
Posts: 3
|
Post by Dener on Apr 21, 2017 17:32:01 GMT
Hello Everyone! I need help to figure out how the RemoveAll method works.
I'm adding rooms on the start of each scene( about 10 rooms per scene), and when I go to a new scene, I want to remove the past scene's rooms, so I can have just the new ones. If you want, I can post here some of my scripts. Cheers
|
|
|
Post by Luís Pedro Fonseca on Apr 21, 2017 17:37:14 GMT
Hi Dener,
To remove all currents rooms all you have to do is:
yourRoomsExtension.Rooms = new List<Room>();
|
|
Dener
New Member
Posts: 3
|
Post by Dener on Apr 21, 2017 17:45:05 GMT
Thank you very much for the fast and simple answer
|
|
|
Post by Luís Pedro Fonseca on Apr 21, 2017 17:46:41 GMT
Actually, a "cleaner" way is to use:
yourRoomsExtension.Rooms.Clear();
|
|