Why Would Trie Data Retrieval Work in Windows Build but not Mac/HTML?
Working on a Scrabble-like game, and so I turned a .txt of the Scrabble word dictionary into an alphabetized trie. The structure is relatively simple: every Node in the Trie contains a char Value, an int Depth, a Node parent, a List children, and a List Words. So the word MEATS gets inserted into the Trie as Node A -> E -> M -> T -> S, and the word gets added to the List Words of this S Node. MATES would also get added to the WORDS list of this S node as it has the same letters, as would STEAM, TEAMS, etc.
The dictionary build process and word lookup work perfectly in-editor and the built .exe (I am working on a PC.) The dictionary is built in about 3 seconds, and given and "hand" of letters can find all possible words in that hand in about 100ms.
However, when I attempt to build the game for HTML5 or for Mac the word lookup fails. My current Debug Logging is such that I know the trie is being populated with nodes and words, but when attempting to get the list of words possible from a set of characters nothing is returned on these platforms. I am using Coroutines throughout the process, using yield commands as appropriate to wait for each method to be completed before proceeding.
What could be the cause for these platform-specific issues? Is it possible that on Mac and HTML5 (but not on Windows) the list is returned before the lookup has actually been completed? I am willing to share the code for the Trie class, dictionary trie building and word lookup if that helps at all