Check out example codes for "unity read text file". It will help you in understanding the concepts better.

Code Example 1

// This is how I read a textfile, contained within the Resources
// folder:
TextAsset textFile;
string text;
string[] lines;

textFile = Resources.Load(fileName) as TextAsset; // Loads file
text = textFile.ToString(); // Converts to string
lines = text.Split('\n'); // Splits per newline
// Do something with it

Learn ReactJs, React Native from