Looking-Glass / JoyconLib

Joy-Con library for Unity.
MIT License
467 stars 91 forks source link

FormatException: Input string was not in a correct format in Unity 2018.3.0f2 #23

Open ChumbaWambalala opened 5 years ago

ChumbaWambalala commented 5 years ago

" FormatException: Input string was not in a correct format. System.Globalization.TimeSpanFormat.Format (System.TimeSpan value, System.String format, System.IFormatProvider formatProvider) (at :0) System.TimeSpan.ToString (System.String format, System.IFormatProvider formatProvider) (at :0) System.Text.StringBuilder.AppendFormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at :0) System.String.FormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at :0) System.String.Format (System.String format, System.Object[] args) (at :0) Joycon.Update () (at Assets/JoyconLib_scripts/Joycon.cs:370) JoyconManager.Update () (at Assets/JoyconLib_scripts/JoyconManager.cs:92) "

Test project is here, added only the latest package provided.

Switch Game.zip

UlyssesWu commented 5 years ago

Maybe simply change TimeSpan formatting string from s to t or g might fix this problem. Or just comment those Debug log lines.

Lag to dequeue: {3:s}. Lag between packets (expect 15ms): {4:s} -> {3:t} {4:g}