Hi Guys, Looking for a fast and effiecient way of doing word/dictionary definition search in Unity.

Hi Guys

I’m trying to implement a word lookup function in unity. I have a dictionary in excel format, for example Column A will have the word “Car” and column B have its definition: “Something on Wheels etc”.

I’m not sure what is the most efficient way of implementing this is, I’m planning to use this function in mobile platforms such as Android or ISO.

It would be great if someone have example code or can point me I the right direction. I believe importing such a huge table into memory is probably not the way to go especially for mobile platforms.

I had experience working with large datasets in SAS R and etc, and kinda new to unity. Could you please share in your opinion whats the best method to handle large tables in unity? Doing simple tasks such as lookup and retrieve associated columns.

Also does unity have built in data processing capabilities or do I need to use some addon? If so could you please share which addons?

Thanks in advance!
Cheers

I don’t know how many entries you have in your Dictionary, but this sounds like these steps:

  • export the Excel file to a CSV file
  • includle the CSV file as a TextAsset in Unity
  • write some code to search… fastest will be a Hashmap/Dictionary

If that isn’t performant enough or your dataset is too big, you’re going to have to start doing other streaming/searching mechanisms that use indexes of what is in there, or breaks it up by the first letter, etc.