Skip to content

Commit 5718a44

Browse files
committed
feat(UI): 添加UGUI和FairyGUI根节点属性
添加UGUIRoot和FairyGUIRoot只读属性,方便外部代码访问对应的根节点变换组件,无需直接访问私有字段。
1 parent f8e41af commit 5718a44

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Runtime/UIComponent.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,22 @@ public partial class UIComponent : GameFrameworkComponent
111111
new UIGroup(UIGroupConstants.System.Depth, UIGroupConstants.System.Name),
112112
};
113113

114+
/// <summary>
115+
/// 获取 UGUI 根节点变换组件。
116+
/// </summary>
117+
public Transform UGUIRoot
118+
{
119+
get { return m_InstanceUGUIRoot; }
120+
}
121+
122+
/// <summary>
123+
/// 获取 FairyGUI 根节点变换组件。
124+
/// </summary>
125+
public Transform FairyGUIRoot
126+
{
127+
get { return m_InstanceFairyGUIRoot; }
128+
}
129+
114130
/// <summary>
115131
/// 获取是否启用界面显示动画。
116132
/// </summary>

0 commit comments

Comments
 (0)