Advertisement
kasru

Texture Changing

Jan 10th, 2013
6,259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //****** Donations are greatly appreciated.  ******
  2. //****** You can donate directly to Jesse through paypal at  https://www.paypal.me/JEtzler   ******
  3.  
  4. var texture1 : Texture2D;
  5. var texture2 : Texture2D;
  6. var change : boolean = true;
  7.  
  8. function Start() {
  9.     changeTexture();
  10. }
  11.  
  12. function Update () {
  13.  
  14. }
  15.  
  16. function changeTexture () {
  17.  
  18.     while(change) {
  19.         yield WaitForSeconds(0.5);
  20.         renderer.material.mainTexture = texture1;  
  21.         yield WaitForSeconds(0.5);
  22.         renderer.material.mainTexture = texture2;
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement