daily pastebin goal
58%
SHARE
TWEET

Unity3D color change script

mvaganov Apr 25th, 2012 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #pragma strict
  2. var defaultColor : Color;
  3. var mouseOverColor : Color;
  4.  
  5. function Start () {
  6.         renderer.material.color = defaultColor;
  7. }
  8.  
  9. function Update () {
  10.  
  11. }
  12.  
  13. function OnMouseEnter() {
  14.         renderer.material.color = mouseOverColor;
  15. }
  16.  
  17. function OnMouseExit() {
  18.         renderer.material.color = defaultColor;
  19. }
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