title: How to modify UI text via script?
body: <p>A simple question: I'm trying to modify UI text (TextMeshPro if that makes any difference) via C# script. I am using the following code:</p>
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  using UnityEngine.UI;
  
  public class Coins : MonoBehaviour
  {
      public Text coins;
      void Start()
      {
          coins = GetComponent&lt;Text&gt;();
      }
  
      void Update()
      {
          coins.text = &quot;text&quot;;
      }
  }
  </code></pre>
  <p>I've done a similar thing in Unity 2018 (I'm currently using Unity 2020.2) and it worked there.
  For some reason it doesn't work here though. I would appreciate any help.</p>