Showing the changes to libraries/script-engine/src/ScriptEngines.cpp (1 of 3 files). Show all
Unified · Split
| @@ -158,8 +158,10 @@ void ScriptEngines::shutdownScripting() { · 157 unmodified lines | |||
| 158 | // and stop. We can safely short circuit this because we know we're in the "quitting" process | 158 | // and stop. We can safely short circuit this because we know we're in the "quitting" process |
| 159 | scriptEngine->disconnect(this); | 159 | scriptEngine->disconnect(this); |
| 160 | 160 | ||
| 161 | // Calling stop on the script engine will set it's internal _isFinished state to true, and result | 161 | // If this is an entity script, we need to unload any entities |
| 162 | // in the ScriptEngine gracefully ending it's run() method. | 162 | scriptEngine->unloadAllEntityScripts(); |
| 163 | |||
| 164 | // Gracefully stop the engine's scripting thread | ||
| 163 | scriptEngine->stop(); | 165 | scriptEngine->stop(); |
| 164 | 166 | ||
| 165 | // We need to wait for the engine to be done running before we proceed, because we don't | 167 | // We need to wait for the engine to be done running before we proceed, because we don't |