Update UIWidget.cs

This commit is contained in:
ALEXTANG
2023-12-15 14:25:41 +08:00
parent 9d137d613a
commit 3a6170dca6

View File

@@ -24,7 +24,7 @@ namespace TEngine
/// 窗口组件名称。
/// </summary>
// ReSharper disable once InconsistentNaming
public string name { private set; get; } = nameof(UIWidget);
public string name { protected set; get; } = string.Empty;
/// <summary>
/// UI类型。
@@ -237,6 +237,7 @@ namespace TEngine
return false;
}
name = GetType().Name;
transform = go.GetComponent<Transform>();
rectTransform = transform as RectTransform;
gameObject = go;