Open karakasis opened 3 years ago
Looking at Elucidsoft code, this is coming from https://github.com/elucidsoft/dotnetstandard-bip39/blob/be9290f7e25bdccfdd6afd85db4e3e55f65fe935/dotnetstandard-bip39/BIP39.cs#L232
I have the same issue, any solution? tried this: https://stackoverflow.com/a/1329631/11213686 then build new .dll Result: same, doesn't work
Im not using the .dll now, made a new C# script with the code in the link from my previous comment, and modified Line 232 as below.
private static string[] GetWordlist(BIP39Wordlist wordlist)
{
var wordlists = new Dictionary<string, string>
{
{BIP39Wordlist.ChineseSimplified.ToString(), "chinese_simplified"},
{BIP39Wordlist.ChineseTraditional.ToString(), "chinese_traditional"},
{BIP39Wordlist.English.ToString(), "english"},
{BIP39Wordlist.French.ToString(), "french"},
{BIP39Wordlist.Italian.ToString(), "italian"},
{BIP39Wordlist.Japanese.ToString(), "japanese"},
{BIP39Wordlist.Korean.ToString(), "korean"},
{BIP39Wordlist.Spanish.ToString(), "spanish"}
};
var wordListFile = wordlists[wordlist.ToString()];
TextAsset worldListResultsAsset = UnityEngine.Resources.Load<TextAsset>("Wordlists/" + wordListFile);
var fileContents = worldListResultsAsset.text;
return fileContents.Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
/*Modified the following code to make it work during runtime
var wordListFile = wordlists[wordlist.ToString()];
var wordListResults = UnityEngine.Resources.ResourceManager.GetString(wordListFile)
.Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
return wordListResults;
*/
}
Apologies, didn't see the issue, glad it's fixed!
I'm getting the follow error in the Google Chrome console, when I'm running my WEBGL game that is using this dll. It works fine in the Unity Editor and when building for PC. Any ideas how to fix this? Thanks