Advertisement
Guest User

HUEshift

a guest
Feb 19th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.35 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. public class hueshift : MonoBehaviour
  4. {
  5.  
  6.  
  7.     private Renderer rend;
  8.     private Material material;
  9.  
  10.     void Start()
  11.     {
  12.         material = GetComponent<Renderer>().material;
  13.     }
  14.  
  15.     void Update()
  16.     {
  17.         material.SetColor("_Color",Color.HSVToRGB(Mathf.PingPong(Time.time/10f, 1), 1, 1));
  18.        
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement