Skip to content

Commit 3aa8c8f

Browse files
committed
don't erase watch() done before load()
1 parent eb98e7e commit 3aa8c8f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎hrt/prefab/Resource.hx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Resource extends hxd.res.Resource {
5151
prefab = loadBypassCache();
5252
cacheVersion = CACHE_VERSION;
5353
onPrefabLoaded(prefab);
54-
watch(function() {}); // auto lib reload
54+
if( !isWatched ) watch(function() {}); // auto lib reload
5555
return cast prefab;
5656
}
5757

@@ -64,7 +64,7 @@ class Resource extends hxd.res.Resource {
6464
prefab.shared.currentPath = entry.path;
6565
cacheVersion = CACHE_VERSION;
6666
onPrefabLoaded(prefab);
67-
watch(function() {}); // auto lib reload
67+
if( !isWatched ) watch(function() {}); // auto lib reload
6868
return cast prefab;
6969
}
7070

0 commit comments

Comments
 (0)