- Home /
Created game objects rollover show guy text
I have a gameobject that creates many spheres as seen in the image using scripts, I want when the mouse rolls over the spheres they display different text for each one. Of course i cant add the script for the roll over to every sphere cause its impossible. How can i do it?
That is a line for one of the spheres:
var C1759 : Color = Color (0.736941366157757,0.315670360610692,0.0526117267684486,.5);var Sphere1759 : GameObject = GameObject.CreatePrimitive(PrimitiveType.Sphere);Sphere1759.transform.position = Vector3(1124.56438471429,13.0049941023469,1367.055232);Sphere1759.transform.localScale = Vector3(1.50249705117344,1.50249705117344,1.50249705117344);Sphere1759.renderer.material.color =C1759;Sphere1759.renderer.material.shader = Shader.Find (" Glossy");Sphere1759.renderer.material.SetColor ("_SpecColor",C1759);