Skip to content

Instantly share code, notes, and snippets.

@benmcnelly
Created April 4, 2017 17:48
Show Gist options
  • Save benmcnelly/f3cec696998ff5f0953f644211739f97 to your computer and use it in GitHub Desktop.
Save benmcnelly/f3cec696998ff5f0953f644211739f97 to your computer and use it in GitHub Desktop.
public string devUpdateUrl = "http://thefortawesome.com/static/fa_game/dev_update.png";
IEnumerator Start() {
Texture2D tex;
tex = new Texture2D(4, 4, TextureFormat.DXT1, false);
WWW www = new WWW(devUpdateUrl);
yield return www;
www.LoadImageIntoTexture(tex);
GetComponent<Renderer>().material.mainTexture = tex;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment