Implement initial Unity-style asset library cache
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <XCEngine/Components/Component.h>
|
||||
#include <XCEngine/Core/Asset/AssetRef.h>
|
||||
#include <XCEngine/Core/Asset/ResourceHandle.h>
|
||||
#include <XCEngine/Resources/Material/Material.h>
|
||||
|
||||
@@ -20,6 +21,7 @@ public:
|
||||
const Resources::ResourceHandle<Resources::Material>& GetMaterialHandle(size_t index) const;
|
||||
const std::string& GetMaterialPath(size_t index) const;
|
||||
const std::vector<std::string>& GetMaterialPaths() const { return m_materialPaths; }
|
||||
const std::vector<Resources::AssetRef>& GetMaterialAssetRefs() const { return m_materialRefs; }
|
||||
|
||||
void SetMaterialPath(size_t index, const std::string& materialPath);
|
||||
void SetMaterial(size_t index, const Resources::ResourceHandle<Resources::Material>& material);
|
||||
@@ -45,6 +47,7 @@ private:
|
||||
|
||||
std::vector<Resources::ResourceHandle<Resources::Material>> m_materials;
|
||||
std::vector<std::string> m_materialPaths;
|
||||
std::vector<Resources::AssetRef> m_materialRefs;
|
||||
bool m_castShadows = true;
|
||||
bool m_receiveShadows = true;
|
||||
uint32_t m_renderLayer = 0;
|
||||
|
||||
Reference in New Issue
Block a user