MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / reloadResource

Method reloadResource

Engine/source/core/resourceManager.cpp:172–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172void ResourceManager::reloadResource( const Torque::Path &path, bool showMessage )
173{
174 if ( showMessage )
175 Con::warnf( "[ResourceManager::notifiedFileChanged] : File changed [%s]", path.getFullPath().c_str() );
176
177 ResourceHeaderMap::Iterator iter = mResourceHeaderMap.find( path.getFullPath() );
178 if ( iter != mResourceHeaderMap.end() )
179 {
180 ResourceBase::Header *header = (*iter).value;
181 mResourceHeaderMap.erase( iter );
182
183 // Move the resource into the previous resource map.
184 iter = mPrevResourceHeaderMap.findOrInsert( path );
185 iter->value = header;
186 }
187
188 // Now notify users of the resource change so they
189 // can release and reload.
190 mChangeSignal.trigger( path );
191}
192
193ResourceBase ResourceManager::startResourceList( ResourceBase::Signature inSignature )
194{

Callers 1

Calls 7

findOrInsertMethod · 0.80
warnfFunction · 0.50
c_strMethod · 0.45
findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
triggerMethod · 0.45

Tested by

no test coverage detected