Files
AIGame/AIClient/AgentScripts/BuildChest.cs
T

18 lines
721 B
C#

using System;
using System.IO;
using AIGame.EditorTools;
using UnityEditor;
using UnityEngine;
public static class BuildChest
{
public static string Build()
{
if (EditorApplication.isPlaying) throw new Exception("Build chest in Edit Mode");
string repo = Directory.GetParent(Application.dataPath).Parent.FullName;
if (string.IsNullOrEmpty(JsonUIPrefabBuilder.BuildFromJsonFile(Path.Combine(repo, "Doc/UIPrefabCreater/UI_PrototypeChest.json")))) throw new Exception("Chest prefab failed");
SetupUiBundleCollector.Setup(); AssetDatabase.SaveAssets();
return "Built Candy chest page: daily chest, owned chest list, fixed/choice contents and open buttons from JSON.";
}
}