- Home /
glow effect on mouse enter
Hello, i want simulate glow effect on lot of gameobject.i think to code : when my mouse enter in one of my gameobject, texture glow effect become true...but like that, i must create too much script...

example : 3 gameobject look like a card so i have 3 script to say onmouseenter texture glow = true
 var glow : GameObject ; //gameobject or texture
 
 function Start ()
 {
 glow.active = false ; 
 }
 
 
 function OnMouseEnter () 
 {
 glow.active = true ;
 }
 
 function OnMouseExit () 
 {
 glow.active = false ;
 }
 
if i use 100gameobject i have 100 script ? So have you an other solution ?
You can have the same script on many gameobjects.
As @Dave suggested if you have 100 game objects you can put the same script on all 100 objects. That is O$$anonymous$$.
If these objects have similar behavior you can make a prefab and use it.
Your answer
 
 
             Follow this Question
Related Questions
MouseOver Clarification Please 2 Answers
affecting only one Prefab in Code. (script) 1 Answer
Selecting Random Object and Setting Variable to True 2 Answers
Select object in another scene 1 Answer
Draw Rectangle 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                