Guest User

Untitled

a guest
Dec 3rd, 2019
126
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ............This part is inside the public class.........................
  2.  
  3.         List<string> TextAssetToList(TextAsset textFile)
  4.         {
  5.            
  6.             return new List<string>(textFile.text.Split('\n'));
  7.  
  8.         }
  9.  
  10.  
  11. ............................This part is inside the Void awake, where the hardcoded values were............
  12.  
  13.         { //HALLILUYAH! TEXT FILE READ HERE AND PUT INTO GRAPH!
  14.            
  15.             TextAsset File = Resources.Load("File") as TextAsset; //turning text asset into string list
  16.  
  17.             List<string> valueListTXT = TextAssetToList(textFile);
  18.  
  19.             valueListTXT.RemoveAll(item => item.Length == 0);
  20.  
  21.  
  22.             List<int> valueList = valueListTXT.Select(x => int.Parse(x)).ToList();
  23.            
  24.             ShowGraph(valueList, LineGraphVisual, -1, (int _i) => "" + (_i + 1), (float _f) => Mathf.RoundToInt(_f) + "°c");
  25.         }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×