Home > other >  FormatException: Invalid format.
FormatException: Invalid format.

Time:09-27

FormatException: Invalid format.
System. Double. Parse (System. The String s, NumberStyles style, IFormatProvider provider) (at/Users/builduser buildslave/mono/build/MCS/class/corlib/System/Double. Cs: 209)
System. Single. Parse (System. The String s) (at/Users/builduser buildslave/mono/build/MCS/class/corlib/System/Single. Cs: 183)
TransformDemo. The Update () (at Assets/Scripts/Day01 TransformDemo. Cs: 48)

Help you a great god, and my unity at run time has been to the wrong, wrong code is as follows:
String STR=GetComponent (). Strbytes;
Speed=float. Parse (STR);
This is a serial port receives a string to a floating-point number, don't know how to solve

CodePudding user response:

Print it out and see the strings
  • Related