Replace TownSquare with HomeCamp art and land humanoid bots, LittleBear, and LmGirl review assets.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -27,6 +27,12 @@ namespace AOT.Editor.YooAssetTools
|
||||
{
|
||||
SetupM3Character.SetupAll();
|
||||
AIGame.EditorTools.SetupUiBundleCollector.Setup();
|
||||
return BuildConfiguredAndStage();
|
||||
}
|
||||
|
||||
/// <summary>Rebuild current collectors without rewriting unrelated character/UI assets.</summary>
|
||||
public static string BuildConfiguredAndStage()
|
||||
{
|
||||
EnsureLoadableScenePrefabs();
|
||||
|
||||
var target = EditorUserBuildSettings.activeBuildTarget;
|
||||
@@ -76,12 +82,11 @@ namespace AOT.Editor.YooAssetTools
|
||||
|
||||
/// <summary>
|
||||
/// 整棵 Scenes 目录不能按文件名做地址:同名模型、材质和嵌套预制体会冲突。
|
||||
/// 只把运行时按名加载的 TownSquare 作为入口,其余场景资源随依赖打进包。
|
||||
/// 只保留显式登记的场景入口,其余场景资源随 Prefab 依赖打进包。
|
||||
/// </summary>
|
||||
public static string EnsureLoadableScenePrefabs()
|
||||
{
|
||||
const string broadPath = "Assets/Bundles/Scenes";
|
||||
const string townSquare = "Assets/Bundles/Scenes/Town/TownSquare/TownSquare.prefab";
|
||||
var package = BundleCollectorSettingData.Setting.Packages.Find(p => p.PackageName == PackageName);
|
||||
if (package == null)
|
||||
return "fail: Art package missing";
|
||||
@@ -96,34 +101,15 @@ namespace AOT.Editor.YooAssetTools
|
||||
if (broad != null)
|
||||
BundleCollectorSettingData.RemoveCollector(group, broad);
|
||||
|
||||
var collector = group.Collectors.Find(c => c.CollectPath == townSquare);
|
||||
if (collector == null)
|
||||
{
|
||||
collector = new BundleCollector
|
||||
{
|
||||
CollectPath = townSquare,
|
||||
CollectorGUID = AssetDatabase.AssetPathToGUID(townSquare),
|
||||
CollectorType = ECollectorType.MainAssetCollector,
|
||||
AddressRuleName = nameof(AddressByFileName),
|
||||
PackRuleName = nameof(PackSeparately),
|
||||
FilterRuleName = nameof(CollectPrefab),
|
||||
AssetTags = "art",
|
||||
};
|
||||
BundleCollectorSettingData.CreateCollector(group, collector);
|
||||
}
|
||||
else
|
||||
{
|
||||
collector.CollectorGUID = AssetDatabase.AssetPathToGUID(townSquare);
|
||||
collector.CollectorType = ECollectorType.MainAssetCollector;
|
||||
collector.AddressRuleName = nameof(AddressByFileName);
|
||||
collector.PackRuleName = nameof(PackSeparately);
|
||||
collector.FilterRuleName = nameof(CollectPrefab);
|
||||
BundleCollectorSettingData.ModifyCollector(group, collector);
|
||||
}
|
||||
// Retired scene entries must not be recreated during Art builds.
|
||||
foreach (var collector in group.Collectors.Where(c =>
|
||||
string.IsNullOrEmpty(AssetDatabase.AssetPathToGUID(c.CollectPath,
|
||||
AssetPathToGUIDOptions.OnlyExistingAssets))).ToArray())
|
||||
BundleCollectorSettingData.RemoveCollector(group, collector);
|
||||
|
||||
package.CheckConfigError();
|
||||
BundleCollectorSettingData.SaveFile();
|
||||
return "ok scenes=" + townSquare;
|
||||
return "ok scene entries=" + group.Collectors.Count;
|
||||
}
|
||||
|
||||
static BuildResult BuildArtPackage(BuildTarget target, string packageVersion)
|
||||
|
||||
Reference in New Issue
Block a user