- The WordList class features the Get and Set properties to control class instantiation, making it a Singleton.
- In addition to being a Singleton, WordList also calls the DontDestroyOnLoad function. This prevents the object from being destroyed when the scene ends, allowing it to carry over to the next scene.
- Take care when using DontDestroyOnLoad, as all child objects and associated texture and mesh resources on the object will also survive and continue to the next scene.
The first programmatic step in working with the WordList is to tokenize the text file. This means we need to generate a complete array of all words in the file, separating the words as distinct units, as opposed to being part of a long string spanning the length ...