UNITY Display internet html on GUI

January 22, 2014   ·   0 Comments

source code: internetSample02_text.cs

using UnityEngine;
using System.Collections;

public class internetSample02_text : MonoBehaviour {

	public string url = "http://www.powenko.com/wordpress/?p=4625";
	private string data1="";
    IEnumerator Start() {
        WWW www = new WWW(url);
        yield return www;
		data1 = www.text;
    }
	
	// Update is called once per frame
	void Update () {
	
	}
	void OnGUI () {
		GUI.Label (new Rect (10, 10, 600, 600), data1);
	}

}

Screen Shot 2014-01-22 at 2.18.55 PM

shareShare on FacebookShare on Google+Share on LinkedInEmail this to someonePrint this pageBuffer this pageDigg thisFlattr the authorShare on RedditPin on PinterestShare on StumbleUponShare on TumblrTweet about this on Twitter

By


Readers Comments (0)


You must be logged in to post a comment.

PowenKo’s Online Store

powenko_arduinoBook
Unity3D4

Amazon

adsbygoogle

Recent Posts

Categories

Amazon