Синтаксис:
Используется csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
public class manu : MonoBehaviour {
public Text but;
public Color old;
public Color neww;
void Start()
{
but = this.GetComponent<Text>();
old = but.color;
}
void OnMouseEnter()
{
but.color = neww;
}
void OnMouseOver()
{
but.color -= new Color(0.1F, 0, 0) * Time.deltaTime;
}
void OnMouseExit()
{
but.color = old;
}
}
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
public class manu : MonoBehaviour {
public Text but;
public Color old;
public Color neww;
void Start()
{
but = this.GetComponent<Text>();
old = but.color;
}
void OnMouseEnter()
{
but.color = neww;
}
void OnMouseOver()
{
but.color -= new Color(0.1F, 0, 0) * Time.deltaTime;
}
void OnMouseExit()
{
but.color = old;
}
}