Search Unity

  1. Click here to receive a gift with your purchase of Unity Pro or Unity Enterprise.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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:
    814
    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:

  2. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    814
    Bump.

    Any info on this?
     
  3. Ryanc_unity

    Ryanc_unity

    Unity Technologies

    Joined:
    Jul 22, 2015
    Posts:
    288
    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.
     
unityunity