Skip to content

Instantly share code, notes, and snippets.

@kyubuns
Created May 27, 2014 11:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyubuns/2ac7d81ac093caac77b5 to your computer and use it in GitHub Desktop.
Save kyubuns/2ac7d81ac093caac77b5 to your computer and use it in GitHub Desktop.
TestButton
using UnityEngine;
using System.Collections;
public class TestButton : MonoBehaviour {
[SerializeField] string imageUrl;
UITexture texture;
void Awake()
{
texture = GetComponent<UITexture>();
}
IEnumerator Start()
{
WWW www = new WWW(imageUrl);
yield return www;
texture.mainTexture = www.texture;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment