We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29e2205 commit bf85fadCopy full SHA for bf85fad
Runtime/Code/Luau/LuauCore.cs
@@ -244,15 +244,13 @@ public void OnDestroy() {
244
#if UNITY_EDITOR
245
EditorApplication.pauseStateChanged -= OnPauseStateChanged;
246
#endif
247
- Profiler.BeginSample("ShutdownLuauState");
248
- LuauState.ShutdownAll();
249
- Profiler.EndSample();
250
- if (_coreInstance && _coreInstance == this) {
+ if (_coreInstance == this) {
+ _coreInstance = null;
251
initialized = false;
+ LuauState.ShutdownAll();
252
Profiler.BeginSample("ShutdownLuauPlugin");
253
LuauPlugin.LuauShutdown();
254
Profiler.EndSample();
255
- _coreInstance = null;
256
if (endOfFrameCoroutine != null) {
257
StopCoroutine(endOfFrameCoroutine);
258
}
0 commit comments