Created
April 4, 2017 17:48
-
-
Save benmcnelly/f3cec696998ff5f0953f644211739f97 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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