public void RemoveReloadable(IReloadableAsset reloadable) { if (_watchers.TryGetValue(reloadable.SourcePath, out var watcher)) { _watchers.Remove(reloadable.SourcePath); watcher.Dispose(); } }
public AssetWatcher(AssetManager assetManager, IReloadableAsset reloadableAsset) { _assetReloader = assetManager.AssetReloader; _asset = reloadableAsset; _watchers = new List <FileSystemWatcher>(); foreach (var pathToWatch in reloadableAsset.GetLiveReloadAssetPaths()) { _watchers.Add(WatchFilePath(pathToWatch)); } }
public void AddReloadable(IReloadableAsset reloadable) { _watchers.Add(reloadable.SourcePath, new AssetWatcher(AssetManager, reloadable)); }