Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class nextScreen : MonoBehaviour {
- // Use this for initialization
- public void chuyenManHinh(){
- Debug.Log ("Thieu mao");
- //Application.LoadLevel (1);
- UILabel subtitle = GameObject.Find("LabelHienThi").GetComponent<UILabel>();
- subtitle.text = "Toan dep trai";
- }
- IEnumerator Start()
- {
- //Load JSON data from a URL
- string url = "http://paultondeur.com/files/2010/UnityExternalJSONXML/books.json";
- url = "https://dl.dropboxusercontent.com/u/119735704/API/store/link.txt";
- WWW www = new WWW(url);
- //Load the data and yield (wait) till it's ready before we continue executing the rest of this method.
- yield return www;
- if (www.error == null)
- {
- //Sucessfully loaded the JSON string
- Debug.Log("Chuoi json: " + www.text);
- //Process books found in JSON file
- //ProcessBooks(www.text);
- }
- else
- {
- Debug.Log("Loi: " + www.error);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment