16 std::string displayName;
17 std::string subassetIdentifier;
19 AssetType assetType = AssetType::Undefined;
24 std::string_view subassetIdentifier,
25 std::string_view displayName,
26 std::string_view address,
29 ) : subassetIdentifier(subassetIdentifier),
30 displayName(displayName),
38 MetaFile(
AssetRegistry& assetRegistry,
const std::filesystem::path&);
40 void Load(
AssetRegistry& assetRegistry,
const std::filesystem::path&);
41 MetaFile(
const MetaFile& other) =
delete;
42 MetaFile(MetaFile&& other)
noexcept =
default;
44 MetaFile& operator=(
const MetaFile& other) =
delete;
45 MetaFile& operator=(MetaFile&& other)
noexcept =
default;
47 void Save(uint32_t currentImporterVersion);
48 void SaveWithoutImporterVersionChange();
49 bool TryGetDefaultSubasset(
Subasset& subasset)
const;
50 Uuid GetOrCreateDefaultSubassetUuid(
const std::string& subassetName, AssetType assetType);
51 Uuid GetOrCreateSubassetUuid(
const std::string& subassetName, AssetType assetType);
52 size_t GetSubassetCount()
const;
53 bool TryGetSubasset(
const std::string& subassetName,
Subasset*& outSubasset);
55 bool TryGetDefaultSubassetUuid(
Uuid& outUuid)
const;
56 bool TryGetSubassetUuid(
const std::string& subassetName,
Uuid& outUuid)
const;
58 bool IsOutdatedImporterVersion(Grindstone::Editor::ImporterVersion currentImporterVersion)
const;
59 bool IsOutdatedMetaVersion()
const;
62 return importerSettings;
65 using Iterator = std::vector<Subasset>::iterator;
66 using ConstIterator = std::vector<Subasset>::const_iterator;
68 Iterator begin() noexcept;
69 ConstIterator begin() const noexcept;
71 Iterator end() noexcept;
72 ConstIterator end() const noexcept;
74 std::
string MakeDefaultAddress(std::string_view subassetName) const;
78 uint32_t importerVersion = 0;
79 uint32_t metaVersion = 0;
81 Subasset defaultSubasset;
82 std::vector<Subasset> subassets;
83 std::filesystem::path metaFilePath;
84 std::filesystem::path baseAssetPath;
85 std::filesystem::path mountedAssetPath;