18 bool isUpdated =
false;
19 std::string displayName;
20 std::string subassetIdentifier;
22 AssetType assetType = AssetType::Undefined;
27 std::string_view subassetIdentifier,
28 std::string_view displayName,
29 std::string_view address,
32 ) : subassetIdentifier(subassetIdentifier),
33 displayName(displayName),
41 MetaFile(
AssetRegistry& assetRegistry,
const std::filesystem::path&);
43 void Load(
AssetRegistry& assetRegistry,
const std::filesystem::path&);
44 MetaFile(
const MetaFile& other) =
delete;
45 MetaFile(MetaFile&& other)
noexcept =
default;
47 MetaFile& operator=(
const MetaFile& other) =
delete;
48 MetaFile& operator=(MetaFile&& other)
noexcept =
default;
50 void Save(uint32_t currentImporterVersion);
51 void SaveWithoutImporterVersionChange();
52 bool TryGetDefaultSubasset(
Subasset& subasset)
const;
53 Uuid GetOrCreateDefaultSubassetUuid(
const std::string& subassetName, AssetType assetType);
54 Uuid GetOrCreateSubassetUuid(
const std::string& subassetName, AssetType assetType);
55 size_t GetSubassetCount()
const;
56 bool TryGetSubasset(
const std::string& subassetName,
Subasset*& outSubasset);
58 bool TryGetDefaultSubassetUuid(
Uuid& outUuid)
const;
59 bool TryGetSubassetUuid(
const std::string& subassetName,
Uuid& outUuid)
const;
61 bool IsOutdatedImporterVersion(Grindstone::Editor::ImporterVersion currentImporterVersion)
const;
62 bool IsOutdatedMetaVersion()
const;
63 uint32_t GetMetaFileVersion()
const;
66 return importerSettings;
69 using Iterator = std::vector<Subasset>::iterator;
70 using ConstIterator = std::vector<Subasset>::const_iterator;
72 Iterator begin() noexcept;
73 ConstIterator begin() const noexcept;
75 Iterator end() noexcept;
76 ConstIterator end() const noexcept;
78 std::
string MakeDefaultAddress(
std::string_view subassetName) const;
82 uint32_t importerVersion = 0;
83 uint32_t metaVersion = 0;
85 Subasset defaultSubasset;
86 std::vector<Subasset> subassets;
87 std::filesystem::path metaFilePath;
88 std::filesystem::path baseAssetPath;
89 std::filesystem::path mountedAssetPath;