title: How to make text reading code execute every several seconds? Making a separate button for forced update does not work for some reason too
body: <p>I am running a graph code where I get the data from a stored txt file. I have been trying for a while to make it so that it reads the file and executes the code at the press of a button or every few seconds but I am unable to make it work. </p>
  
  <p>Whatever I do the graph displays data that was only loaded at the awake state.</p>
  
  <pre><code>//public class stuff related to the loading of the txt file
          List&lt;string&gt; TextAssetToList(TextAsset textFile)
          {            
              return new List&lt;string&gt;(textFile.text.Split('\n'));
          }
  
   //all inside Awake
          {
  
              TextAsset File = Resources.Load("File") as TextAsset; //turning text asset into string list
  
              List&lt;string&gt; valueListTXT = TextAssetToList(textFile);
  
              valueListTXT.RemoveAll(item =&gt; item.Length == 0);
  
  
              List&lt;float&gt; valueList = valueListTXT.Select(x =&gt; float.Parse(x)).ToList();
  
              valueListTXT.RemoveAll(item =&gt; item.Length == 0);
  
              ShowGraph(valueList, LineGraphVisual, -1, (float _i) =&gt; "" + (_i + 1), (float _f) =&gt; (_f) + "°c");
          }
  
  </code></pre>
  
  <p>Edit: Found another issue while trying to get it to work: thought about just destroying the and then starting the MonoBehaviour but it does not account for the updated txt file for some reason  and just keeps on piling up game objects the graph is built out of.
  I made the graph following the CodeMonkey tutorial if that helps anyone...</p>