Implementing basic asset serialization

This commit is contained in:
Dynamitos
2023-02-13 14:56:13 +01:00
parent 9e1e4076f0
commit 48fa098546
82 changed files with 1834 additions and 423 deletions
+2 -2
View File
@@ -29,9 +29,9 @@ void MaterialLoader::importAsset(MaterialImportArgs args)
{
std::filesystem::path assetPath = args.filePath.filename();
assetPath.replace_extension("asset");
PMaterialAsset asset = new MaterialAsset(assetPath.generic_string());
PMaterialAsset asset = new MaterialAsset(args.importPath, assetPath.stem().string());
asset->setStatus(Asset::Status::Loading);
AssetRegistry::get().registerMaterial(asset, args.importPath);
AssetRegistry::get().registerMaterial(asset);
import(args, asset);
}