You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections;
|
|
|
|
public class EmailLoader : MonoBehaviour
|
|
|
|
{
|
|
|
|
public Transform contentParent;
|
|
|
|
public GameObject emailItemPrefab;
|
|
|
|
public EmailData[] emails;
|
|
|
|
IEnumerator Start()
|
|
|
|
{
|
|
|
|
yield return new WaitUntil(() => LanguageManager.Instance != null && LanguageManager.Instance.languageSetBool == true);
|
|
|
|
LoadEmails();
|
|
|
|
}
|
|
|
|
|
|
|
|
void LoadEmails()
|
|
|
|
{
|
|
|
|
foreach (var email in emails)
|
|
|
|
{
|
|
|
|
GameObject go = Instantiate(emailItemPrefab, contentParent);
|
|
|
|
var controller = go.GetComponent<EmailUIController>();
|
|
|
|
controller.Setup(email);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|