16 bool isUpdated =
false;
17 std::string displayName;
18 std::string subassetIdentifier;
20 AssetType assetType = AssetType::Undefined;
25 std::string_view subassetIdentifier,
26 std::string_view displayName,
27 std::string_view address,
30 ) : subassetIdentifier(subassetIdentifier),
31 displayName(displayName),
39 MetaFile(
AssetRegistry& assetRegistry,
const std::filesystem::path&);
41 void Load(
AssetRegistry& assetRegistry,
const std::filesystem::path&);
42 MetaFile(
const MetaFile& other) =
delete;
43 MetaFile(MetaFile&& other)
noexcept =
default;
45 MetaFile& operator=(
const MetaFile& other) =
delete;
46 MetaFile& operator=(MetaFile&& other)
noexcept =
default;
48 void Save(uint32_t currentImporterVersion);
49 void SaveWithoutImporterVersionChange();
50 bool TryGetDefaultSubasset(
Subasset& subasset)
const;
51 Uuid GetOrCreateDefaultSubassetUuid(
const std::string& subassetName, AssetType assetType);
52 Uuid GetOrCreateSubassetUuid(
const std::string& subassetName, AssetType assetType);
53 size_t GetSubassetCount()
const;
54 bool TryGetSubasset(
const std::string& subassetName,
Subasset*& outSubasset);
56 bool TryGetDefaultSubassetUuid(
Uuid& outUuid)
const;
57 bool TryGetSubassetUuid(
const std::string& subassetName,
Uuid& outUuid)
const;
59 bool IsOutdatedImporterVersion(Grindstone::Editor::ImporterVersion currentImporterVersion)
const;
60 bool IsOutdatedMetaVersion()
const;
63 return importerSettings;
66 using Iterator = std::vector<Subasset>::iterator;
67 using ConstIterator = std::vector<Subasset>::const_iterator;
69 Iterator begin() noexcept;
70 ConstIterator begin() const noexcept;
72 Iterator end() noexcept;
73 ConstIterator end() const noexcept;
75 std::
string MakeDefaultAddress(std::string_view subassetName) const;
79 uint32_t importerVersion = 0;
80 uint32_t metaVersion = 0;
82 Subasset defaultSubasset;
83 std::vector<Subasset> subassets;
84 std::filesystem::path metaFilePath;
85 std::filesystem::path baseAssetPath;
86 std::filesystem::path mountedAssetPath;