[BUG]cannot convert from 'string' to 'char'
ldgz123 opened this issue · 9 comments
ldgz123 commented
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'
ldgz123 commented
RafaelChavesSM commented
Currently having the same bug
RafaelChavesSM commented
I believe I fixed it doing:
return data.Split(serializationToken.ToCharArray()).ToList();
Katerlad commented
Fresh install of 1.5.2 also caused this error for me as well.
Awais6 commented
same here
gakkossphynx commented
return data.Split(serializationToken.ToCharArray()).ToList();
314pies commented
For anyone who's running into this issue - would you mind sharing which Unity version you are using?
gpiffaretti commented
Unity version 2021.1.28f1
314pies commented
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 theListOfStringsPreference.Deserialize()
method behavior which will break the optional sym-link folders feature.- Split(Char[], StringSplitOptions) => Split based on a list of characters
- Split(String, StringSplitOptions) => Split based on "a" string
- 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.