先修复一下,错误的场景 删除不必要的钓场资产 修复into场景 update:更新meta文件,修复报错 update:修复资源 修复第一章节建造 修复建造第三章 update:删除多余内容 update:更新README.md update:还原图标 update:更新README update:更新配置
44 lines
1.2 KiB
C#
44 lines
1.2 KiB
C#
using System.Linq;
|
|
using System.Text;
|
|
using UnityEngine;
|
|
|
|
namespace Coffee.UISoftMaskInternal.AssetModification
|
|
{
|
|
internal abstract class GameObjectModifier : Modifier
|
|
{
|
|
private static readonly StringBuilder s_ReportLog = new StringBuilder();
|
|
public IComponentModifier[] componentModifiers;
|
|
|
|
protected bool ModifyGameObject(GameObject root, bool dryRun)
|
|
{
|
|
foreach (var modifier in componentModifiers)
|
|
{
|
|
modifier.ModifyComponent(root, dryRun);
|
|
}
|
|
|
|
return componentModifiers.Any(x => x.isModified);
|
|
}
|
|
|
|
protected override string ModificationReport()
|
|
{
|
|
if (!hasUpgraded) return string.Empty;
|
|
|
|
s_ReportLog.Length = 0;
|
|
foreach (var componentModifier in componentModifiers)
|
|
{
|
|
if (componentModifier.isModified)
|
|
{
|
|
s_ReportLog.Append(componentModifier.Report());
|
|
}
|
|
}
|
|
|
|
if (0 < s_ReportLog.Length)
|
|
{
|
|
s_ReportLog.Length--;
|
|
}
|
|
|
|
return s_ReportLog.ToString();
|
|
}
|
|
}
|
|
}
|