34 lines
834 B
C#
34 lines
834 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class AddressPanel : MonoBehaviour
|
|
{
|
|
public GameObject addressPrefab;
|
|
public Transform trans;
|
|
|
|
|
|
void Start()
|
|
{
|
|
getData();
|
|
}
|
|
|
|
public async void getData()
|
|
{
|
|
AdressResponse adressResponse = new AdressResponse();
|
|
AdressList83 adressList83 = new AdressList83();
|
|
adressResponse = await adressList83.AdressList();
|
|
int length = adressResponse.data.Count;
|
|
for(int i = 0; i < length; i++)
|
|
{
|
|
//Debug.Log(i);
|
|
GameObject addres = GameObject.Instantiate(addressPrefab,trans);
|
|
addres.name = "address_" + i;
|
|
addressItem item = addres.GetComponent<addressItem>();
|
|
item.SetInfo();
|
|
}
|
|
|
|
|
|
}
|
|
}
|