Add prototype gameplay loop with character/battlefield assets and server game APIs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
udx
2026-10-20 18:50:00 +08:00
co-authored by Cursor
parent 79369e4473
commit 6c64210331
833 changed files with 998079 additions and 1042 deletions
@@ -0,0 +1,45 @@
#if UNITY_EDITOR
using System.Linq;
using UnityEditor;
using UnityEngine;
using YooAsset.Editor;
namespace AIGame.EditorTools
{
/// <summary>把 Candy UI Prefab 收进 Art;图片/字体通过 Prefab 依赖进入资源包。</summary>
public static class SetupUiBundleCollector
{
[MenuItem("Tools/UI/Setup UI Bundle Collector")]
public static string Setup()
{
var package = BundleCollectorSettingData.Setting.Packages.FirstOrDefault(p => p.PackageName == "Art");
if (package == null) throw new System.InvalidOperationException("Set up the Art package before UI collection.");
var group = package.Groups.FirstOrDefault(g => g.GroupName == "UI");
if (group == null) group = BundleCollectorSettingData.CreateGroup(package, "UI");
group.GroupDesc = "Candy UI";
group.AssetTags = "ui";
group.ActiveRuleName = nameof(EnableGroup);
BundleCollectorSettingData.ModifyGroup(package, group);
const string path = "Assets/Bundles/UI/Prefab";
var collector = group.Collectors.FirstOrDefault(c => c.CollectPath == path);
if (collector == null)
{
collector = new BundleCollector
{
CollectPath = path,
CollectorGUID = AssetDatabase.AssetPathToGUID(path),
CollectorType = ECollectorType.MainAssetCollector,
AddressRuleName = nameof(AddressByFileName),
PackRuleName = nameof(PackSeparately),
FilterRuleName = nameof(CollectPrefab),
AssetTags = "ui"
};
BundleCollectorSettingData.CreateCollector(group, collector);
}
package.CheckConfigError();
BundleCollectorSettingData.SaveFile();
return "Art/UI collects Candy UI by prefab name, including sprite/font dependencies.";
}
}
}
#endif