File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -71,10 +71,16 @@ public static void Build(string[] args)
7171 // Gather values from args
7272 Dictionary < string , string > options = GetValidatedOptions ( args ) ;
7373
74- // Set version for this build
75- PlayerSettings . bundleVersion = options [ "buildVersion" ] ;
76- PlayerSettings . macOS . buildNumber = options [ "buildVersion" ] ;
77- PlayerSettings . Android . bundleVersionCode = int . Parse ( options [ "androidVersionCode" ] ) ;
74+ // Set version for this build if provided
75+ if ( options . TryGetValue ( "buildVersion" , out string buildVersion ) && buildVersion != "none" )
76+ {
77+ PlayerSettings . bundleVersion = buildVersion ;
78+ PlayerSettings . macOS . buildNumber = buildVersion ;
79+ }
80+ if ( options . TryGetValue ( "androidVersionCode" , out string versionCode ) && versionCode != "0" )
81+ {
82+ PlayerSettings . Android . bundleVersionCode = int . Parse ( options [ "androidVersionCode" ] ) ;
83+ }
7884
7985 // Apply build target
8086 var buildTarget = ( BuildTarget ) Enum . Parse ( typeof ( BuildTarget ) , options [ "buildTarget" ] ) ;
You can’t perform that action at this time.
0 commit comments