20 lines
727 B
C#
20 lines
727 B
C#
using System;
|
|
using System.IO;
|
|
using AIGame.EditorTools;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
public static class BuildSettings
|
|
{
|
|
public static string Build()
|
|
{
|
|
if (EditorApplication.isPlaying) throw new Exception("Build settings in Edit Mode");
|
|
string repo = Directory.GetParent(Application.dataPath).Parent.FullName;
|
|
if (string.IsNullOrEmpty(JsonUIPrefabBuilder.BuildFromJsonFile(Path.Combine(repo, "Doc/UIPrefabCreater/UI_PrototypeSettings.json"))))
|
|
throw new Exception("Settings prefab failed");
|
|
SetupUiBundleCollector.Setup();
|
|
AssetDatabase.SaveAssets();
|
|
return "Built Candy settings page: audio, quality, vibrate and account info from JSON.";
|
|
}
|
|
}
|