ScriptsModel instances should be created & destroyed on the same thread (for ESS)
Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 1 file). Show all
Unified · Split
| @@ -69,9 +69,6 @@ EntityScriptServer::EntityScriptServer(ReceivedMessage& message) : ThreadedAssig · 68 unmodified lines | ||
| 69 | 69 | DependencyManager::set<AudioInjectorManager>(); |
| 70 | 70 | |
| 71 | 71 | DependencyManager::set<ScriptCache>(); |
| 72 | − DependencyManager::set<ScriptEngines>(ScriptEngine::ENTITY_SERVER_SCRIPT); | |
| 73 | − | |
| 74 | − DependencyManager::set<EntityScriptServerServices>(); | |
| 75 | 72 | |
| 76 | 73 | |
| 77 | 74 | // Needed to ensure the creation of the DebugDraw instance on the main thread |
| @@ -254,6 +251,9 @@ void EntityScriptServer::handleEntityScriptCallMethodPacket(QSharedPointer<Recei · 176 unmodified lines | ||
| 254 | 251 | |
| 255 | 252 | |
| 256 | 253 | void EntityScriptServer::run() { |
| 254 | + DependencyManager::set<ScriptEngines>(ScriptEngine::ENTITY_SERVER_SCRIPT); | |
| 255 | + DependencyManager::set<EntityScriptServerServices>(); | |
| 256 | + | |
| 257 | 257 | // make sure we request our script once the agent connects to the domain |
| 258 | 258 | auto nodeList = DependencyManager::get<NodeList>(); |
| 259 | 259 | |