18 lines
695 B
C#
18 lines
695 B
C#
using System;
|
|
using System.IO;
|
|
using AIGame.EditorTools;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
public static class BuildMail
|
|
{
|
|
public static string Build()
|
|
{
|
|
if (EditorApplication.isPlaying) throw new Exception("Build mail in Edit Mode");
|
|
string repo = Directory.GetParent(Application.dataPath).Parent.FullName;
|
|
if (string.IsNullOrEmpty(JsonUIPrefabBuilder.BuildFromJsonFile(Path.Combine(repo, "Doc/UIPrefabCreater/UI_PrototypeMail.json")))) throw new Exception("Mail prefab failed");
|
|
SetupUiBundleCollector.Setup(); AssetDatabase.SaveAssets();
|
|
return "Built Candy mail list, paged rows, scrollable details and claim buttons from JSON.";
|
|
}
|
|
}
|