Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit b78e622

Browse files
fix
1 parent 5e2c321 commit b78e622

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

com.unity.uiwidgets/Runtime/engine/UIWidgetsPanel.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,13 @@ protected void OnEnable() {
248248
TryEnableOnDemandGC();
249249
#endif
250250
Application.lowMemory += () => {
251-
GarbageCollector.GCMode = GarbageCollector.Mode.Enabled;
251+
#if !UNITY_EDITOR
252+
TryDisableOnDemandGC();
253+
#endif
252254
GC.Collect();
253-
GarbageCollector.GCMode = GarbageCollector.Mode.Disabled;
255+
#if !UNITY_EDITOR
256+
TryEnableOnDemandGC();
257+
#endif
254258
};
255259

256260

0 commit comments

Comments
 (0)