TH1/Unity/Assets/Scripts/Core/Analyzer/FriendOfAttribute.cs
2025-07-17 18:26:28 +08:00

19 lines
574 B
C#

using System;
namespace ET
{
/// <summary>
/// 数据修改友好标记, 用于允许修改指定Component或Child数据的类上
/// 例如:MoveComponentSystem需要修改MoveComponent的数据, 需要在MoveComponentSystem加上[FriendOf(typeof(MoveComponent))]
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
public class FriendOfAttribute : Attribute
{
public Type Type;
public FriendOfAttribute(Type type)
{
this.Type = type;
}
}
}