File tree Expand file tree Collapse file tree
game/addons/tools/Code/Scene Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ public void OnViewModeChanged( SceneViewWidget.ViewMode viewMode )
4040 public void SetGameView ( )
4141 {
4242 GameMode . SetPlayWidget ( Renderer ) ;
43+ Tools . ClearScreen ( ) ;
4344 IsGameView = true ;
4445 }
4546
@@ -82,6 +83,7 @@ public void OnEject()
8283 public void OnPossessGame ( )
8384 {
8485 GameMode . SetPlayWidget ( Renderer ) ;
86+ Tools . ClearScreen ( ) ;
8587 IsGameView = true ;
8688 }
8789}
Original file line number Diff line number Diff line change @@ -188,6 +188,14 @@ private void CreateToolFor( Type t )
188188 }
189189 }
190190
191+ public void ClearScreen ( )
192+ {
193+ foreach ( var tool in ComponentTools )
194+ tool ? . Dispose ( ) ;
195+ ComponentTools . Clear ( ) ;
196+ previousHash = - 1 ;
197+ }
198+
191199 /// <summary>
192200 /// Switches to the named tool type next editor frame.
193201 /// </summary>
You can’t perform that action at this time.
0 commit comments