private void Start() { scrollingUIControl = ScrollingSessionListUIController.Instance; textMesh = transform.parent.GetComponentInChildren <TextMesh>(); textMaterial = textMesh.GetComponent <MeshRenderer>().material; textColorId = Shader.PropertyToID("_Color"); textMaterial.SetColor(textColorId, Color.grey); networkDiscovery = NetworkDiscoveryWithAnchors.Instance; }
void OnEnable() { textMesh = gameObject.GetComponentInChildren <TextMesh>(); textMaterial = textMesh.GetComponent <MeshRenderer>().material; textColorId = Shader.PropertyToID("_Color"); scrollingUIController = ScrollingSessionListUIController.Instance; if (scrollingUIController == null) { Debug.Log("sad"); } }