daily pastebin goal
68%
SHARE
TWEET

HUEshift

a guest Feb 19th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top