修正 P0 UI Attribute 契约文档
This commit is contained in:
@@ -510,15 +510,10 @@ public sealed class UIPanelAttribute : Attribute
|
||||
public string Path { get; }
|
||||
public PanelStrategy? OverrideStrategy { get; }
|
||||
|
||||
public UIPanelAttribute(
|
||||
string layer,
|
||||
string path = null,
|
||||
PanelStrategy? overrideStrategy = null)
|
||||
{
|
||||
Layer = layer;
|
||||
Path = path;
|
||||
OverrideStrategy = overrideStrategy;
|
||||
}
|
||||
public UIPanelAttribute(string layer);
|
||||
public UIPanelAttribute(string layer, string path);
|
||||
public UIPanelAttribute(string layer, PanelStrategy overrideStrategy);
|
||||
public UIPanelAttribute(string layer, string path, PanelStrategy overrideStrategy);
|
||||
}
|
||||
```
|
||||
|
||||
@@ -549,6 +544,7 @@ public abstract class UIPanelBase<TViewModel> : MonoBehaviour
|
||||
|
||||
- Panel 必须声明 `UIPanelAttribute`。
|
||||
- Attribute 未指定 path 时,按命名约定推导资源路径。
|
||||
- C# Attribute 构造参数不支持 `Nullable<T>`,因此 `OverrideStrategy` 属性保持 nullable,但构造函数通过重载表达“未指定”和“指定覆盖策略”。
|
||||
- 同层级采用 LIFO 栈。
|
||||
- 关闭非栈顶 Panel 抛异常。
|
||||
- Destroy 策略关闭时释放资源 handle。
|
||||
|
||||
Reference in New Issue
Block a user