Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MailCollectionDataLoader : MonoBehaviour {
- public static List<string> allMailCategories = new List<string>();
- //load all mail definition
- string[] pathToFiles = new string[0];
- MailContainer[] mcs = new MailContainer[2];
- void Start () {
- pathToFiles = new string[2] {"spammails","privatemails"};
- for (int i = 0; i < pathToFiles.Length; i++) {
- mcs [i] = MailContainer.Load (pathToFiles [i]);
- }
- allMailCategories.Clear();
- for (int i = 0; i < mcs.Length; i++) {
- foreach (Mail mail in mcs[i].Mails) {
- allMailCategories.Add (mail.category);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment