| | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEditor; |
| | | using System.IO; |
| | | |
| | | public class BuiltInResourceSetting |
| | | { |
| | | public static void SetLaunchBackGround(string versionName, BuildTarget buildTarget) |
| | | public static void SetLaunchBackGround(string publisher, BuildTarget buildTarget) |
| | | { |
| | | var fromPath = "Assets/Editor/Logo/" + versionName + "/Launch.png"; |
| | | var fromPath = "Assets/Editor/Logo/" + GetVersionName(publisher) + "/Launch.png"; |
| | | var toPath = "Assets/Resources/UI/Sprites/Launch.png"; |
| | | AssetDatabase.DeleteAsset(toPath); |
| | | AssetDatabase.CopyAsset(fromPath, toPath); |
| | |
| | | |
| | | } |
| | | |
| | | public static void SetLoginBackGround(string versionName, BuildTarget buildTarget) |
| | | public static void SetLoginBackGround(string publisher, BuildTarget buildTarget) |
| | | { |
| | | var fromPath = "Assets/Editor/Logo/" + versionName + "/LoginBackGround.png"; |
| | | var fromPath = "Assets/Editor/Logo/" + GetVersionName(publisher) + "/LoginBackGround.png"; |
| | | var toPath = "Assets/Resources/UI/Sprites/LoginBackGround.png"; |
| | | AssetDatabase.DeleteAsset(toPath); |
| | | AssetDatabase.CopyAsset(fromPath, toPath); |
| | |
| | | } |
| | | } |
| | | |
| | | public static void SetLoginLogo(string versionName, BuildTarget buildTarget) |
| | | public static void SetLoginLogo(string publisher, BuildTarget buildTarget) |
| | | { |
| | | var fromPath = "Assets/Editor/Logo/" + versionName + "/TB_DL_Logo.png"; |
| | | var fromPath = "Assets/Editor/Logo/" + GetVersionName(publisher) + "/TB_DL_Logo.png"; |
| | | var toPath = "Assets/ResourcesOut/BuiltIn/UI/Sprites/TB_DL_Logo.png"; |
| | | AssetDatabase.DeleteAsset(toPath); |
| | | AssetDatabase.CopyAsset(fromPath, toPath); |
| | |
| | | } |
| | | } |
| | | |
| | | static string GetVersionName(string _publisher) |
| | | { |
| | | var lines = File.ReadAllLines(ClientPackage.versionsFilePath); |
| | | for (int i = 2; i < lines.Length; i++) |
| | | { |
| | | var line = lines[i]; |
| | | var lineStrings = line.Split('\t'); |
| | | if (lineStrings[0] == _publisher) |
| | | { |
| | | return lineStrings[1]; |
| | | } |
| | | } |
| | | |
| | | return string.Empty; |
| | | } |
| | | |
| | | } |