using FairyGUI; using UnityEngine; using XGame.Framework.UI; namespace XGame.Framework.FGUI { public class FguiNested : IUINested { // fgui的dispose会先销毁GO再回调 private GComponent _component; public GComponent Component => _component; public Transform Tr => _component?.displayObject?.gameObject?.transform ?? null; bool IUINested.IsActiveSelf => _component?.displayObject?.gameObject?.activeSelf ?? false; bool IUINested.IsActiveInHierarchy => _component?.displayObject?.gameObject?.activeInHierarchy ?? false; void IUINested.SetActive(bool isActive) { _component.displayObject.visible = isActive; } public FguiNested(GComponent component) { _component = component; } } }