Added recognition for material and prefab types when generating meta files

This commit is contained in:
Xiao Qi 2022-11-22 21:54:51 +08:00
parent bcd8b37fd7
commit cc2587a7bd
1 changed files with 28 additions and 0 deletions

View File

@ -653,6 +653,34 @@ namespace SHADE
return newAsset.id; return newAsset.id;
} }
else if(ext == MATERIAL_EXTENSION)
{
SHAsset newAsset{
path.stem().string(),
GenerateAssetID(AssetType::MATERIAL),
AssetType::MATERIAL,
path,
false
};
assetCollection.emplace(newAsset.id, newAsset);
SHAssetMetaHandler::WriteMetaData(newAsset);
return newAsset.id;
}
else if (ext == PREFAB_EXTENSION)
{
SHAsset newAsset{
path.stem().string(),
GenerateAssetID(AssetType::PREFAB),
AssetType::PREFAB,
path,
false
};
assetCollection.emplace(newAsset.id, newAsset);
SHAssetMetaHandler::WriteMetaData(newAsset);
return newAsset.id;
}
else if (ext == FONT_EXTENSION) else if (ext == FONT_EXTENSION)
{ {
SHAsset newAsset{ SHAsset newAsset{