SHARE
TWEET

Untitled




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");
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.