| | |
| | | public static readonly string versionsFilePath = Application.dataPath + Path.DirectorySeparatorChar + "Editor/VersionConfigs/Versions.txt"; |
| | | public static readonly string[] baseLevels = new string[] { "Assets/Resources/Scenes/Launch.unity", "Assets/Resources/Scenes/Empty.unity" };
|
| | |
|
| | | public static string SDK_PLUGIN_PROJECT
|
| | | {
|
| | | public static string SDK_PLUGIN_PROJECT {
|
| | | get { return LocalSave.GetString("SDK_PROJECT_PATH"); }
|
| | | set { LocalSave.SetString("SDK_PROJECT_PATH", value); }
|
| | | } |
| | | |
| | | static string ANDROID_PLUGIN_PATH = Application.dataPath + "/Plugins/Android"; |
| | | |
| | | static int packageIndex
|
| | | {
|
| | | static int packageIndex {
|
| | | get { return LocalSave.GetInt("ClientPackageIndex", 1); }
|
| | | set { LocalSave.SetInt("ClientPackageIndex", value); }
|
| | | } |
| | |
| | | |
| | | private static void PreBuild(string _publisher)
|
| | | {
|
| | | try
|
| | | {
|
| | | var newVersionConfigPath = StringUtility.Contact("Assets/Resources/ScriptableObject/Config/VersionConfig", ".asset");
|
| | | var versionName = string.Empty;
|
| | | var fromVersionConfig = GetVersionConfig(_publisher, out versionName);
|
| | |
| | | PlayerSettings.allowedAutorotateToPortraitUpsideDown = false;
|
| | | PlayerSettings.bundleVersion = newVersionConfig.version;
|
| | |
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | Debug.Log(ex);
|
| | | }
|
| | | finally
|
| | | {
|
| | | AssetDatabase.SaveAssets();
|
| | | AssetDatabase.Refresh();
|
| | | } |
| | | |
| | | } |
| | | |
| | | static VersionConfig GetVersionConfig(string _publisher, out string _versionName)
|
| | | {
|
| | | var lines = File.ReadAllLines(versionsFilePath);
|