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.
25 lines
494 B
C#
25 lines
494 B
C#
|
|
using UnityEngine;
|
|
|
|
public class EmailLoader : MonoBehaviour
|
|
{
|
|
public Transform contentParent;
|
|
public GameObject emailItemPrefab;
|
|
public EmailData[] emails;
|
|
|
|
void Start()
|
|
{
|
|
LoadEmails();
|
|
}
|
|
|
|
void LoadEmails()
|
|
{
|
|
foreach (var email in emails)
|
|
{
|
|
GameObject go = Instantiate(emailItemPrefab, contentParent);
|
|
var controller = go.GetComponent<EmailUIController>();
|
|
controller.Setup(email);
|
|
}
|
|
}
|
|
}
|