Quantcast
Viewing all articles
Browse latest Browse all 62

Change www texture every day

I am trying to change the texture of a model every 24 hours. It's like a little story with pages unlocked each day. I figured how to check the day of the week : var url = "http://halgatewood.com/wp-content/uploads/2011/10/linen_bg_tile.jpg"; function Start () { if (System.DateTime.Now.DayOfWeek != System.DayOfWeek.Sunday) { var weekdayPic : WWW = new WWW ("http://www.airshiphero.com/fbtwitter/topImage.png"); yield weekdayPic; renderer.material.mainTexture = weekdayPic.texture; } else if (System.DateTime.Now.DayOfWeek == System.DayOfWeek.Sunday) { var sundayPic : WWW = new WWW ("http://forum.unity3d.com/attachment.php?attachmentid=16698&stc=1&d=1295263006"); yield sundayPic; renderer.material.mainTexture = sundayPic.texture; } } but not sure how to check if it's the next day or now (don't care if sunday or monday - just that is the next one); With this I want to load the images from an array or alphabetically.

Viewing all articles
Browse latest Browse all 62

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>