Search Unity

float.Parse in ProGrids

Discussion in 'World Building' started by rawieo, Jul 5, 2018.

  1. rawieo

    rawieo

    Joined:
    Feb 1, 2018
    Posts:
    12
    The thing is that some time ago ProGrids saved some colour preferences in in form of

    RGBA(x.xx, x.xx, x.xx, x.xx)

    Then, when loading preferences, it filters characters leaving only

    x.xx,x.xx,x.xx,x.xx

    This string is then spliced by `,`, of which result is array of four string in form `x.xx`.
    The problem is that when `float.Parse` is trying to parse those strings expects them to be in form `x,xx` because of my regional settings and thus I would expect more people to have this problem, yet I have no success googling it.

    And I have no clue how to fix it pls halp
     
  2. rawieo

    rawieo

    Joined:
    Feb 1, 2018
    Posts:
    12
    I temporarily fixed it by deleting prefs from registry.
    The problem now is that when the colour is getting saved, it is being represented by floating point numbers with commas separated by commas (lol). I expect those to be completely uneditable

    upload_2018-7-5_23-4-31.png
     
  3. rawieo

    rawieo

    Joined:
    Feb 1, 2018
    Posts:
    12
    Yes, they are completely broken now

    upload_2018-7-5_23-9-39.png
     
  4. rawieo

    rawieo

    Joined:
    Feb 1, 2018
    Posts:
    12
    And also Unity now throws exceptions

    upload_2018-7-5_23-18-35.png
     
  5. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    552
    Thanks for the bug report, this has been fixed for the next update.
     
    YurySedyakin likes this.