Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

BvhImporterExporter (for Unity 3D)

Import/Export skeletons in Unity games during runtime using motion capture data saved in the Biovision Hierarchy format. · By Winterdust

BvhImporterExporter Support Sticky

A topic by Winterdust created Jul 18, 2016 Views: 487 Replies: 2
Viewing posts 1 to 2
Developer (1 edit)

If you're having any trouble please feel free to post about it here and I'll help out.

Hi, 

I'm using Unity 2020.3.14f1 and when I import a demo and make a script like:  new BVH("D:\\Databases\\CMU\\BVH\\01\\01_08.bvh", -10).makeDebugSkeleton(true, "00ff00")

I get an error:

"

FormatException: Input string was not in a correct format.

System.Number.ParseSingle (System.String value, System.Globalization.NumberStyles options, System.Globalization.NumberFormatInfo numfmt) (at <695d1cc93cca45069c528c15c9fdd749>:0)
....
"

It's not related to the path, it's sth with parsing the actuall bvh. Can you help?


Marcin

Developer

Sounds something like ParseSingle() expecting numbers to use comma instead of period as the decimal point. Try specifically setting C#'s culture info to en-US before doing the BVH calls. ParseSingle() should then recognize the format as being correct.

System.Globalization.CultureInfo timeCultureUS = new System.Globalization.CultureInfo("en-US");
Thread.CurrentThread.CurrentCulture = timeCultureUS;
Thread.CurrentThread.CurrentUICulture = timeCultureUS;
//BVH related things here