@@ -20,7 +20,7 @@ public class UiManager
2020 private class ModalEntity
2121 {
2222 public UiDialogHandle Handle ;
23- public bool IsPrefab ;
23+ public bool IsTemporary ;
2424 public RectTransform Curtain ;
2525 public ShowModalOption Option ;
2626 }
@@ -145,7 +145,7 @@ public UiDialogHandle ShowModalTemplate(GameObject gameObject, object param = nu
145145 dialogGo . SetActive ( true ) ;
146146
147147 var dialog = dialogGo . GetComponent < UiDialog > ( ) ;
148- return ShowModalInternal ( dialog , false , param , option ) ;
148+ return ShowModalInternal ( dialog , true , param , option ) ;
149149 }
150150
151151 public UiDialogHandle ShowModal < T > ( T dialog , object param = null ,
@@ -179,7 +179,7 @@ public UiDialogHandle ShowModalRoot<T>(object param = null,
179179 return ShowModal ( dialog , param , option ) ;
180180 }
181181
182- private UiDialogHandle ShowModalInternal ( UiDialog dialog , bool isPrefab , object param , ShowModalOption option )
182+ private UiDialogHandle ShowModalInternal ( UiDialog dialog , bool isTemporary , object param , ShowModalOption option )
183183 {
184184 float z = ( _modals . Count + 2 ) * - 10 ;
185185
@@ -218,7 +218,7 @@ private UiDialogHandle ShowModalInternal(UiDialog dialog, bool isPrefab, object
218218 _modals . Add ( new ModalEntity
219219 {
220220 Handle = handle ,
221- IsPrefab = isPrefab ,
221+ IsTemporary = isTemporary ,
222222 Curtain = curtain ,
223223 Option = option
224224 } ) ;
@@ -253,7 +253,7 @@ internal bool HideModal(UiDialog dialog, object returnValue)
253253 var dialogCg = dialog . GetComponent < CanvasGroup > ( ) ;
254254 dialogCg . DOFade ( 0f , 0.2f ) . SetEase ( Ease . OutCubic ) . SetUpdate ( true ) . OnComplete ( ( ) =>
255255 {
256- if ( entity . IsPrefab )
256+ if ( entity . IsTemporary )
257257 {
258258 UnityEngine . Object . Destroy ( entity . Handle . Dialog . gameObject ) ;
259259 }
0 commit comments