# Reading a word list into an array

I am making a simple hangman game, I have a small list of words in a .txt file separated by new lines. I put the word list into the assets folder. How can I find the path to the word list so I can use:

string[] wordlist = System.IO.File.ReadAllLines("pathToFile");


Or is there another solution of converting the word list into a string array?

• docs.unity3d.com/Manual/StreamingAssets.html. Like the answer I have little to no exp with Unity, found this link with a search engine, as you should be doing before asking – realUser404 Dec 28 '16 at 16:56
• Please consider researching your question, before posting. Questions that show no research effort may receive down votes. – Gnemlock Dec 28 '16 at 22:53

I have little experience with Unity, but it appears as though you can use Application.dataPath to obtain the correct path.