I have a cube, and I want the cursor (which is a GUI texture situated at the center of the screen) to change textures as it hovers over it. The GUI texture is not parented to the cube, because there are going to be multiple cubes.
2 Answers
2http://unity3d.com/support/documentation/ScriptReference/MonoBehaviour.OnMouseOver.html http://unity3d.com/support/documentation/ScriptReference/Material-mainTexture.html
var male : Texture2D;
var ren : Renderer; //IS THE CUBE WHERE YOU WANT CHANGE THE TEXTURE
function OnGUI()
{
ren.renderer.material.mainTexture = male;
}