using OnMouseover to reveal text

hi

I’m new to coding and I have some code I’m wanting to use, I know its wrong for now but what I’m wanting from it is for some text to be hidden on game start but to be revealed if another piece of text is hovered over by the mouse.

note: I want the text that is revealed to be able to be clicked by the user as a button

here’s my useless code

using UnityEngine;
using System.Collections;

public class mouseover : MonoBehaviour {

// Use this for initialization
void Start () {
!renderer.enabled;
}

}

// Update is called once per frame
function Update () {

	if(OnMouseOver)
		renderer.enabled;
	
	if(OnMouseOver.false)
		!renderer.enabled;
}
		
}

Go to this link : function OnMouseEnter

This may also help you a little,

You may want to do something like this

for example:

function Awake()
{

renderer.enabled = false;

}

function OnMouseEnter
()
{

renderer.enabled = true;

}

function OnMouseExit
()
{

renderer.enabled = false;

}

Hope this helps :slight_smile: