socialpoint-labs / unity-yaml-parser

Python3 library to manipulate Unity serialized files from outside the Unity Editor.
https://pypi.org/project/unityparser/
MIT License
137 stars 24 forks source link

preserve formatting of floats in edge cases #65

Closed rafzi closed 6 months ago

rafzi commented 11 months ago

some floats would be written as scientific notation using the default representer. this will cause yaml to insert a !!float tag which is not recognized by unity.

for example: 0.000000001 --> !!float 1e-9

sp-ricard-valverde commented 11 months ago

I'll be closing this PR according to comment https://github.com/socialpoint-labs/unity-yaml-parser/issues/66#issuecomment-1812157358.

I'll prepare a new major release in the following weeks tackling the float formatting problem from it's root(treating them as strings when serialized, then let the user decide if they want to convert them to float when manipulating the yaml attributes).

Thank you for you're contribution though, it was much appreciated !

rafzi commented 11 months ago

sounds great thanks for your efforts!