VeriorPies/ParrelSync

[BUG]cannot convert from 'string' to 'char'

ldgz123 opened this issue · 9 comments

cannot convert from 'string' to 'char'

Library/PackageCache/com.veriorpies.parrelsync@141b4e1e31/Editor/Preferences.cs(91,31): error CS1503: Argument 1: cannot convert from 'string' to 'char'

Currently having the same bug

I believe I fixed it doing:

return data.Split(serializationToken.ToCharArray()).ToList();

Fresh install of 1.5.2 also caused this error for me as well.

same here

return data.Split(serializationToken.ToCharArray()).ToList();

For anyone who's running into this issue - would you mind sharing which Unity version you are using?

Unity version 2021.1.28f1

Some updates/notes here:

  • The is caused by the different in String.Split() between .NET Standard 2.0 (used by Unity 2021.1.28) and .NET Standard 2.1 (used by more recent Unity version)
  • The changes above (return data.Split(serializationToken.ToCharArray()).ToList();) will change the ListOfStringsPreference.Deserialize() method behavior which will break the optional sym-link folders feature.
  • As @ktyldev mentioned in his PR, a more proper fixes for .NET Standard 2.0 capability will be:
    return data.Split(new string[] { serializationToken }, System.StringSplitOptions.None).ToList();
    

Fixes is now available on dev, waiting to be released to main branch.