Skip to content

Commit db4186c

Browse files
committed
fix(FairyGUIFormHelper): 修复未设置动画属性时未使用默认值的问题
当UI表单未设置显示或隐藏动画属性时,现在会使用UI组件的默认动画设置值 GameFrameX/GameFrameX.Unity#40
1 parent 95d3d13 commit db4186c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Runtime/FairyGUIFormHelper.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,21 @@ public override IUIForm CreateUIForm(object uiFormInstance, Type uiFormType, obj
109109
uiForm.EnableShowAnimation = optionShowAnimation.Enable;
110110
uiForm.ShowAnimationName = optionShowAnimation.AnimationName;
111111
}
112+
else
113+
{
114+
uiForm.EnableShowAnimation = m_UIComponent.IsEnableUIShowAnimation;
115+
}
112116

113117
var hideAnimationAttribute = uiFormType.GetCustomAttribute(typeof(OptionUIHideAnimationAttribute));
114118
if (hideAnimationAttribute is OptionUIHideAnimationAttribute optionHideAnimation)
115119
{
116120
uiForm.EnableHideAnimation = optionHideAnimation.Enable;
117121
uiForm.HideAnimationName = optionHideAnimation.AnimationName;
118122
}
123+
else
124+
{
125+
uiForm.EnableHideAnimation = m_UIComponent.IsEnableUIHideAnimation;
126+
}
119127

120128
if (uiGroup == null)
121129
{

0 commit comments

Comments
 (0)