15 private int textColorId;
20 private TextMesh textMesh;
25 private Material textMaterial;
40 textMesh = transform.parent.GetComponentInChildren<TextMesh>();
41 textMaterial = textMesh.GetComponent<MeshRenderer>().material;
42 textColorId = Shader.PropertyToID(
"_Color");
43 textMaterial.SetColor(textColorId, Color.grey);
51 if (networkDiscovery.running && networkDiscovery.isClient)
55 textMaterial.SetColor(textColorId, Color.blue);
59 textMaterial.SetColor(textColorId, Color.grey);
64 textMaterial.SetColor(textColorId, Color.grey);
71 private void OnDestroy()
73 if (textMaterial != null)
75 Destroy(textMaterial);