File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,12 +12,17 @@ public class MonoView : MonoBehaviour
1212
1313 public CanvasGroup canvasGroup { get ; private set ; }
1414
15- public ViewStack parentStack { get ; private set ; }
15+ public ViewStack parentStack { get ; internal set ; }
1616
1717 public bool cullWindowsBehind => _cullWindowsBehind ;
1818
1919 public bool isTopMost => parentStack && parentStack . top == this ;
2020
21+ /// <summary>
22+ /// Returns true if this view is currently part of a ViewStack.
23+ /// </summary>
24+ public bool isInStack => parentStack ;
25+
2126 public Canvas canvas { get ; private set ; }
2227
2328 /// <summary>
Original file line number Diff line number Diff line change @@ -286,6 +286,7 @@ public void Pop(MonoView instance)
286286
287287 _stack . RemoveAt ( idx ) ;
288288 instance . OnPopped ( ) ;
289+ instance . parentStack = null ;
289290
290291 var transition = instance . ExitTransition ( ) ;
291292 if ( transition != null )
@@ -384,6 +385,7 @@ private void RemoveTop()
384385 var topView = _stack [ ^ 1 ] ;
385386 _stack . RemoveAt ( _stack . Count - 1 ) ;
386387 topView . OnPopped ( ) ;
388+ topView . parentStack = null ;
387389
388390 var transition = topView . ExitTransition ( ) ;
389391 if ( transition != null )
You can’t perform that action at this time.
0 commit comments