Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

PlayerSettings new Version field

Discussion in '2018.3 Beta' started by bdovaz, Oct 7, 2018.

  1. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,051
    As you can see in the attached screenshot there is a new field that there wasn't in previous Unity versions.

    We always have problems settings the appropiate value using Jenkins:

    Code (CSharp):
    1. PlayerSettings.macOS.buildNumber = buildNumber.ToString(); // Only for macOS
    2. PlayerSettings.iOS.buildNumber = buildNumber.ToString(); // Only for iOS
    3. PlayerSettings.Android.bundleVersionCode = buildNumber; // Only for Android
    4. PlayerSettings.WSA.packageVersion = new Version(versionString); // Only for WSA
    5.  
    6. PlayerSettings.bundleVersion = versionString; // Only for Android & iOS
    7.  
    8. // There is no built-in way for setting it on WebGL
    Is there in 2018.3 beta a new API for settings it in a unified way?
     

    Attached Files:

    chrismarch likes this.
  2. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,051
    Bump.

    Any info on this?
     
  3. Ryanc_unity

    Ryanc_unity

    Unity Technologies

    Joined:
    Jul 22, 2015
    Posts:
    332
    Code (CSharp):
    1. // Editor only get / set API. Also what is displayed in your image.
    2. PlayerSettings.bundleVersion = versionString;
    3. // Runtime api to get what you set
    4. Application.version == versionString;
    Looks like the docs need some updating. The rest of the API's you listed above are not the same thing as they are platform specific values that may or may not be required depending on the platform implementation. I'd have to ping the platform folks for more details on those specific values.
     
    TomerMatific likes this.