FBX User Props String bug?

Hi All
Having a very strange issue with parsing a string in c#. I have the following line:

Spline 1,1,20,194.45,7.04375,0,193.006,6.81458,0,194.45,7.04.........306,188.24,7.27031,0,187.606,7.65052,0,188.874,6.8901,0,2.80959,190.958,6.7,0,189.78,6.7,0,191.842,6.7,0,3.51239

I output the string to the console before attempting to parse it and the console shows:

Spline 1,1,20,194.45,7.04375,0,193.006,6.81458,0,194.45,7.04.....,186.87,8.80625,0,186.59,9.45,0,187.149,8.1625,0, 2.09306,188.24,7.27031,0,187.606,7.65052,0,188.874,6.8901,0,2.80959,190.958,6.7,0,189.78,6.7,0,191.842,6.7,0,3.51239

So all looks ok but when I then split the string with a ‘,’ as the delim it doesnt return the correct number of values, as you can see somehow an extra carriage return has been added to the string. The split shows values up to the 2.09306. Is there a limit on string length or something with Regex.Split?
Thanks
Chris
Edit: Sorry cant seem to get the two code boxes to justify

Ok seemed to have tracked down the issue a bit more, the string Iam passing is the one passed into OnPostprocessGameObjectWithUserProperties as the values string from user props set in Max. If the fbx file is a binary then the all is fine and the string passed to the function doesnt have an extra carriage return in it, but if its an Ascii file then a long string (over 1004 chars it seems) gets messed about with. Is this a bug?

This could be a bug with the Mono libraries. However, you may be able to use String.Split as an alternative.

Thanks for the reply :slight_smile:

I have tested with Split etc but it actually the string being passed into OnPostprocessGameObjectWithUserProperties that has been mangled slightly, so must be an issue with the Fbx import code in unity. It’s not a great problem as binary Fbx files dont suffer from the issue but still just in case anyone has issues in the future thought I would mention it, now back to work on my exporter :slight_smile:

Thanks again for your time.
Chris