daily pastebin goal
48%
SHARE
TWEET

Unity3D color change script

mvaganov Apr 25th, 2012 99 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
Top