19 lines
832 B
C#
19 lines
832 B
C#
using System;
|
|
using System.IO;
|
|
using AIGame.EditorTools;
|
|
using UnityEditor;
|
|
|
|
public static class BuildFriends
|
|
{
|
|
public static string Build()
|
|
{
|
|
if (EditorApplication.isPlaying) throw new Exception("Build the friends page in Edit Mode");
|
|
string repo = Directory.GetParent(UnityEngine.Application.dataPath).Parent.FullName;
|
|
if (string.IsNullOrEmpty(JsonUIPrefabBuilder.BuildFromJsonFile(Path.Combine(repo, "Doc/UIPrefabCreater/UI_PrototypeFriends.json")))) throw new Exception("Friends prefab failed");
|
|
if (string.IsNullOrEmpty(JsonUIPrefabBuilder.BuildFromJsonFile(Path.Combine(repo, "Doc/UIPrefabCreater/UI_MainHUD.json")))) throw new Exception("Home button failed");
|
|
SetupUiBundleCollector.Setup();
|
|
AssetDatabase.SaveAssets();
|
|
return "Built the friends page";
|
|
}
|
|
}
|