Added asset id into compile function to facilitate event sending
This commit is contained in:
parent
f7bb8606be
commit
5623115e29
|
@ -383,7 +383,7 @@ namespace SHADE
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SHAssetManager::CompileAsset(AssetPath const& path, bool genMeta) noexcept
|
void SHAssetManager::CompileAsset(AssetPath const& path, bool genMeta, AssetID id) noexcept
|
||||||
{
|
{
|
||||||
if (!std::filesystem::exists(path))
|
if (!std::filesystem::exists(path))
|
||||||
{
|
{
|
||||||
|
|
|
@ -90,7 +90,7 @@ namespace SHADE
|
||||||
static std::vector<SHAssetData const*> GetAllDataOfType(AssetType type) noexcept;
|
static std::vector<SHAssetData const*> GetAllDataOfType(AssetType type) noexcept;
|
||||||
static std::vector<SHAsset> GetAllRecordOfType(AssetType type) noexcept;
|
static std::vector<SHAsset> GetAllRecordOfType(AssetType type) noexcept;
|
||||||
|
|
||||||
static void CompileAsset(AssetPath const& path, bool genMeta) noexcept;
|
static void CompileAsset(AssetPath const& path, bool genMeta, AssetID id = 0) noexcept;
|
||||||
|
|
||||||
static FolderPointer GetRootFolder() noexcept;
|
static FolderPointer GetRootFolder() noexcept;
|
||||||
static void RefreshDirectory() noexcept;
|
static void RefreshDirectory() noexcept;
|
||||||
|
|
|
@ -233,7 +233,7 @@ namespace SHADE
|
||||||
{
|
{
|
||||||
if(ImGui::Selectable("Compile"))
|
if(ImGui::Selectable("Compile"))
|
||||||
{
|
{
|
||||||
SHAssetManager::CompileAsset(file.path, !file.compiled);
|
SHAssetManager::CompileAsset(file.path, !file.compiled, file.assetMeta->id);
|
||||||
QueueRefresh();
|
QueueRefresh();
|
||||||
}
|
}
|
||||||
ImGui::EndPopup();
|
ImGui::EndPopup();
|
||||||
|
|
Loading…
Reference in New Issue