14 private const string LineMode =
"Line Mode";
15 private const string PolygonMode =
"Geometry Mode";
16 private TextMesh text;
17 private int fadeTime = 100;
18 private Material material;
22 text = GetComponent<TextMesh>();
23 material = GetComponent<Renderer>().material;
30 text.text = PolygonMode;
37 DestroyImmediate(material);
43 if (gameObject.activeInHierarchy)
50 if (!text.text.Contains(LineMode))
56 if (!text.text.Contains(PolygonMode))
58 text.text = PolygonMode;
67 var color = material.color;
70 material.color = color;
71 gameObject.SetActive(
false);
75 var color = material.color;
77 material.color = color;