PlayerSettings new Version field

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:

PlayerSettings.macOS.buildNumber = buildNumber.ToString(); // Only for macOS
PlayerSettings.iOS.buildNumber = buildNumber.ToString(); // Only for iOS
PlayerSettings.Android.bundleVersionCode = buildNumber; // Only for Android
PlayerSettings.WSA.packageVersion = new Version(versionString); // Only for WSA

PlayerSettings.bundleVersion = versionString; // Only for Android & iOS

// 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?

3760141--313531--Untitled.png

1 Like

Bump.

Any info on this?

// Editor only get / set API. Also what is displayed in your image.
PlayerSettings.bundleVersion = versionString;
// Runtime api to get what you set
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.

1 Like