Files
FlowScope/My project/Assets/FlowScope/Runtime/UI/UIPanelAttribute.cs
2026-05-18 11:58:49 +08:00

43 lines
1.1 KiB
C#

using System;
namespace FlowScope.UI
{
[AttributeUsage(AttributeTargets.Class)]
public sealed class UIPanelAttribute : Attribute
{
public UIPanelAttribute(string layer)
: this(layer, null, null)
{
}
public UIPanelAttribute(string layer, string path)
: this(layer, path, null)
{
}
public UIPanelAttribute(string layer, PanelStrategy overrideStrategy)
: this(layer, null, overrideStrategy)
{
}
public UIPanelAttribute(string layer, string path, PanelStrategy overrideStrategy)
: this(layer, path, (PanelStrategy?)overrideStrategy)
{
}
private UIPanelAttribute(
string layer,
string path,
PanelStrategy? overrideStrategy)
{
Layer = layer;
Path = path;
OverrideStrategy = overrideStrategy;
}
public string Layer { get; }
public string Path { get; }
public PanelStrategy? OverrideStrategy { get; }
}
}