Skip to content

Commit

Permalink
commented out reinitializing file watchers - reported that it goes in…
Browse files Browse the repository at this point in the history
…to a loop
  • Loading branch information
Chris Handzlik committed Mar 13, 2023
1 parent f9a3052 commit f30526d
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions Assets/FastScriptReload/Scripts/Editor/FastScriptReloadManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -281,17 +281,15 @@ public void Update()
}
else if (_lastPlayModeStateChange == PlayModeStateChange.EnteredPlayMode)
{
if (_lastPlayModeStateChange == PlayModeStateChange.EnteredPlayMode)
{
EnsureInitialized();
}

if (_lastPlayModeStateChange != PlayModeStateChange.ExitingPlayMode && Application.isPlaying && Instance._fileWatchers.Count == 0 && FastScriptReloadPreference.FileWatcherSetupEntries.GetElementsTyped().Count > 0)
{
LoggerScoped.LogWarning("Reinitializing file-watchers as defined configuration does not match current instance setup. If hot reload still doesn't work you'll need to reset play session.");
ClearFileWatchers();
EnsureInitialized();
}
EnsureInitialized();

// if (_lastPlayModeStateChange != PlayModeStateChange.ExitingPlayMode && Application.isPlaying && Instance._fileWatchers.Count == 0 && FastScriptReloadPreference.FileWatcherSetupEntries.GetElementsTyped().Count > 0)
// {
// LoggerScoped.LogWarning("Reinitializing file-watchers as defined configuration does not match current instance setup. If hot reload still doesn't work you'll need to reset play session.");
// ClearFileWatchers();
// EnsureInitialized();
// }
}

AssignConfigValuesThatCanNotBeAccessedOutsideOfMainThread();
Expand Down

0 comments on commit f30526d

Please sign in to comment.