ECS/Project/Project/Resources/ResourceManager/MaterialResourceManager/MaterialResourceManager.cpp
//	Update the Material in the Material Resource Manager, specified by name.
Update the Material in the Material Resource Manager, specified by name.
Update the Material in the Material Resource Manager specified by name .
void MaterialResourceManager::updateMaterial(std::string currentMaterialName, std::shared_ptr<MaterialData> newMaterialData)
{
	auto materialIterator = mapNameToMaterialData.find(currentMaterialName);
	if (materialIterator != mapNameToMaterialData.end())
	{
		materialIterator->second = newMaterialData;
		std::shared_ptr<ResourceEvent> newEvent = std::make_shared<ResourceEvent>(ResourceType::MATERIAL_RESOURCE, ResourceEventType::RESOURCE_UPDATED, ModuleType::MATERIAL_MANAGER, currentMaterialName, newMaterialData);
		getDispatcher()->dispatchToEventQueue(newEvent);
	}
	else
	{
	}
}
void MaterialResourceManager :: updateMaterial ( std :: string currentMaterialName , std :: shared_ptr < MaterialData > newMaterialData ) { auto materialIterator = mapNameToMaterialData . find ( currentMaterialName ) ; if ( materialIterator != mapNameToMaterialData . end ( ) ) { materialIterator -> second = newMaterialData ; std :: shared_ptr < ResourceEvent > newEvent = std :: make_shared < ResourceEvent > ( ResourceType :: MATERIAL_RESOURCE , ResourceEventType :: RESOURCE_UPDATED , ModuleType :: MATERIAL_MANAGER , currentMaterialName , newMaterialData ) ; getDispatcher ( ) -> dispatchToEventQueue ( newEvent ) ; } else { } }
Update the Material in the Material Resource Manager, specified by name.
Update the Material in the Material Resource Manager specified by name .
//	Find the Material. //	TO DO //	Throw did not find MaterialData error.