File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1643,17 +1643,6 @@ private void EnterPlayMode()
16431643 return ;
16441644 }
16451645
1646- StaticFieldCrawler . Clear ( ) ;
1647-
1648- // Snapshot static fields before play mode so we can restore them on exit
1649- foreach ( Assembly assembly in ScriptAssemblyManager . GetAllRelevantAssemblies ( ) )
1650- {
1651- if ( ! assembly . FullName . StartsWith ( "System." ) && ! assembly . FullName . StartsWith ( "Microsoft." ) )
1652- {
1653- StaticFieldCrawler . SnapshotStaticFields ( assembly ) ;
1654- }
1655- }
1656-
16571646 // Clear selection (references will be invalid)
16581647 Selection . Clear ( ) ;
16591648
@@ -1711,18 +1700,6 @@ private void ExitPlayMode()
17111700 // Unload the play scene
17121701 Runtime . Resources . Scene . Unload ( ) ;
17131702
1714- // Clear all static fields
1715- foreach ( Assembly assembly in ScriptAssemblyManager . GetAllRelevantAssemblies ( ) )
1716- {
1717- if ( ! assembly . FullName . StartsWith ( "System." ) && ! assembly . FullName . StartsWith ( "Microsoft." ) )
1718- {
1719- StaticFieldCrawler . ClearAllStaticFields ( assembly ) ;
1720- }
1721- }
1722-
1723- // Restore static fields to their pre-play-mode values
1724- StaticFieldCrawler . RestoreStaticFields ( ) ;
1725-
17261703 // Restore the editor scene WITHOUT lifecycle callbacks
17271704 if ( _savedEditorScene != null )
17281705 {
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments