19 lines
848 B
C#
19 lines
848 B
C#
using System;
|
|
using System.IO;
|
|
using AIGame.EditorTools;
|
|
using UnityEditor;
|
|
|
|
public static class BuildFishing
|
|
{
|
|
public static string Build()
|
|
{
|
|
if (EditorApplication.isPlaying) throw new Exception("Build the fishing page in Edit Mode");
|
|
string repo = Directory.GetParent(UnityEngine.Application.dataPath).Parent.FullName;
|
|
if (string.IsNullOrEmpty(JsonUIPrefabBuilder.BuildFromJsonFile(Path.Combine(repo, "Doc/UIPrefabCreater/UI_PrototypeFishing.json")))) throw new Exception("Fishing prefab failed");
|
|
if (string.IsNullOrEmpty(JsonUIPrefabBuilder.BuildFromJsonFile(Path.Combine(repo, "Doc/UIPrefabCreater/UI_PrototypeChallenges.json")))) throw new Exception("Challenge entry failed");
|
|
SetupUiBundleCollector.Setup();
|
|
AssetDatabase.SaveAssets();
|
|
return "Built the fishing page";
|
|
}
|
|
}
|