Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ............This part is inside the public class.........................
- List<string> TextAssetToList(TextAsset textFile)
- {
- return new List<string>(textFile.text.Split('\n'));
- }
- ............................This part is inside the Void awake, where the hardcoded values were............
- { //HALLILUYAH! TEXT FILE READ HERE AND PUT INTO GRAPH!
- TextAsset File = Resources.Load("File") as TextAsset; //turning text asset into string list
- List<string> valueListTXT = TextAssetToList(textFile);
- valueListTXT.RemoveAll(item => item.Length == 0);
- List<int> valueList = valueListTXT.Select(x => int.Parse(x)).ToList();
- ShowGraph(valueList, LineGraphVisual, -1, (int _i) => "" + (_i + 1), (float _f) => Mathf.RoundToInt(_f) + "°c");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement