using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class ZoneController : MonoBehaviour { public uint id; public string name_zone; public bool ZoneColor = true; public TextMesh TextMesh; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } void OnMouseOver() { if (ZoneColor) transform.GetComponent().material.color = new Color(0, 1, 0, 0.5f); } void OnMouseExit() { if (ZoneColor) transform.GetComponent().material.color = new Color(1, 0, 0, 0.5f); } public void Rename(string name_obj, string name) { gameObject.name = name_obj; TextMesh.text = name; } }