using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; public class LoadScene : MonoBehaviour { public Button nextBtn; public Button yesBtn; public GameObject templatePrefab; public Transform temlateContent; public getTemplateList getTemplaste; // Start is called before the first frame update void Start() { nextBtn.onClick.AddListener(OnClickNextBtn); yesBtn.onClick.AddListener(OnClickYesBtn); } private async void OnClickYesBtn() { TemplateListData templateListData = await getTemplaste.TemplaRst(); foreach (var info in templateListData.data) { Debug.Log("+++++++++++>>>>>>>>>>>>>>>>"+info); GameObject template=GameObject.Instantiate(templatePrefab, temlateContent); TemplateInfo templateInfo = template.GetComponent(); } } public void OnClickNextBtn() { SceneManager.LoadScene(2); } }