Answers for "insert a color scheme into unity"

2

how to change color in html

<font color="red">This is some text!</font>
Posted by: Guest on February-09-2020
0

how to change color of highlighted text in unity

using UnityEngine;
using System.Collections;
using UnityEngine.EventSystems;
using UnityEngine.UI;

public class MenuButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler 
{
    public Text theText;
    public void OnPointerEnter(PointerEventData eventData)
    {         
        theText.color = Color.red; //Or however you do your color
    }
    public void OnPointerExit(PointerEventData eventData) 
    {         
        theText.color = Color.white; //Or however you do your color 
    } 
}
Posted by: Guest on February-29-2020

Browse Popular Code Answers by Language