ECS/Project/Project/Resources/ResourceManager/MaterialResourceManager/MaterialResourceManager.cpp
//	Delete the Material in the MaterialResourceManager.
Delete the Material in the MaterialResourceManager.
Delete the Material in the MaterialResourceManager .
void MaterialResourceManager::deleteMaterial(std::string deadMaterialName)
{
	auto materialIterator = mapNameToMaterialData.find(deadMaterialName);
	if (materialIterator != mapNameToMaterialData.end())
	{
		mapNameToMaterialData.erase(deadMaterialName);
		std::shared_ptr<ResourceEvent> newEvent = std::make_shared<ResourceEvent>(ResourceType::MATERIAL_RESOURCE, ResourceEventType::RESOURCE_DESTROYED, ModuleType::MATERIAL_MANAGER, deadMaterialName, nullptr);
		getDispatcher()->dispatchToEventQueue(newEvent);
	}
	else
	{
	}
}
void MaterialResourceManager :: deleteMaterial ( std :: string deadMaterialName ) { auto materialIterator = mapNameToMaterialData . find ( deadMaterialName ) ; if ( materialIterator != mapNameToMaterialData . end ( ) ) { mapNameToMaterialData . erase ( deadMaterialName ) ; std :: shared_ptr < ResourceEvent > newEvent = std :: make_shared < ResourceEvent > ( ResourceType :: MATERIAL_RESOURCE , ResourceEventType :: RESOURCE_DESTROYED , ModuleType :: MATERIAL_MANAGER , deadMaterialName , nullptr ) ; getDispatcher ( ) -> dispatchToEventQueue ( newEvent ) ; } else { } }
Delete the Material in the MaterialResourceManager.
Delete the Material in the MaterialResourceManager .
//	Find the Material. //	TO DO //	Throw did not find MaterialData error.