Comments

  • Two variables should be added to the class to support the Awake function: firstly, FileWordList (declared as TextAsset FileWordList), which references the Word List text asset, as loaded from the Resources folder, and secondly, Words, which is an array of strings (string[] Words). This represents the tokenized file (the words from the file separated into unique elements).
  • The Resources.Load function is called to load the text asset resource at runtime from the file, loading the resultant string into FileWordList.
  • After FileWordList has been created and populated with string data from the word list file, the Split function is called with the "\r\n" string argument, indicating that words should be separated by new lines. This returns ...

Get Mastering Unity 2017 Game Development with C# - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.