Run default addressables build conditionally (#231)

* Add asmdef and Addressable content build in the builder

* Move asmdef content into its own directory

* Mark UnityBuilderAction as Editor-only
This commit is contained in:
Sakari Bergen
2021-03-19 19:50:39 +02:00
committed by GitHub
parent b769675b38
commit 224f973562
25 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
using System;
using UnityEditor;
namespace UnityBuilderAction.Versioning
{
public class VersionApplicator
{
public static void SetVersion(string version)
{
if (version == "none") {
return;
}
Apply(version);
}
public static void SetAndroidVersionCode(string androidVersionCode) {
PlayerSettings.Android.bundleVersionCode = Int32.Parse(androidVersionCode);
}
static void Apply(string version)
{
PlayerSettings.bundleVersion = version;
PlayerSettings.macOS.buildNumber = version;
}
}
}