Agent requires the ModelCache singleton for zone entities w/ meshes

This commit is contained in:
Simon Walton 2019-03-19 16:16:53 -07:00
parent 44f897fbd2
commit 775eddc265

View file

@ -52,6 +52,8 @@
#include <WebSocketServerClass.h>
#include <EntityScriptingInterface.h> // TODO: consider moving to scriptengine.h
#include <hfm/ModelFormatRegistry.h>
#include "entities/AssignmentParentFinder.h"
#include "AssignmentDynamicFactory.h"
#include "RecordingScriptingInterface.h"
@ -99,6 +101,9 @@ Agent::Agent(ReceivedMessage& message) :
DependencyManager::set<RecordingScriptingInterface>();
DependencyManager::set<UsersScriptingInterface>();
DependencyManager::set<ModelFormatRegistry>();
DependencyManager::set<ModelCache>();
// Needed to ensure the creation of the DebugDraw instance on the main thread
DebugDraw::getInstance();
@ -819,6 +824,9 @@ void Agent::aboutToFinish() {
DependencyManager::get<ResourceManager>()->cleanup();
DependencyManager::destroy<ModelFormatRegistry>();
DependencyManager::destroy<ModelCache>();
DependencyManager::destroy<PluginManager>();
// cleanup the AudioInjectorManager (and any still running injectors)