Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

[Solved] Package Manager 2.1.1 not working with most CultureInfo

Discussion in 'Package Manager' started by Djayp, Feb 9, 2019.

  1. Djayp

    Djayp

    Joined:
    Feb 16, 2015
    Posts:
    33
    The Package Manager throws exceptions in PackageInfo.cs, l.76 :
    var version = Convert.ToDouble(shortVersionId.Split('@')[1]);    // Works since shortversion acts like a decimal
    (I love this comment :) )

    replaced by :
    var version = Convert.ToDouble(shortVersionId.Split('@')[1], System.Globalization.CultureInfo.CreateSpecificCulture("en-US"));
     
    jashan and alexzzzz like this.
  2. alexzzzz

    alexzzzz

    Joined:
    Nov 20, 2010
    Posts:
    1,371
    With Russian too. Actually with half of the world's CultureInfo.

    Noobs!

    System.Globalization.CultureInfo.InvariantCulture

    decimal.png

    PS
    Also, not sure it's a good place for using floating point values.
    Code (CSharp):
    1. if (version < 4.1))
    2.     redirectUrl = "https://github.com/Unity-Technologies/ShaderGraph/wiki";
    There's no such thing as 4.1. There is
    Code (CSharp):
    1. if (version < 4.0999999999999996447286321199499070644378662109375))
    2.     redirectUrl = "https://github.com/Unity-Technologies/ShaderGraph/wiki";
    Maybe it's fine, but still super weird.
     
    Last edited: Feb 9, 2019
    jashan likes this.
  3. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    60
    Thank you for reporting the issue. It will be fixed in a future release of the package.
     
    MNNoxMortem and Djayp like this.