MCPcopy Create free account
hub / github.com/Illation/ETEngine / ModelComponent

Method ModelComponent

Engine/source/EtFramework/Components/ModelComponent.cpp:45–55  ·  view source on GitHub ↗

----------------------- ModelComponent::c-tor load assets from ids

Source from the content-addressed store, hash-verified

43// load assets from ids
44//
45ModelComponent::ModelComponent(core::HashString const meshId, core::HashString const materialId)
46{
47 m_Mesh = core::ResourceManager::Instance()->GetAssetData<render::MeshData>(meshId);
48
49 // Load material
50 m_Material = core::ResourceManager::Instance()->GetAssetData<render::Material>(materialId, false);
51 if (m_Material == nullptr)
52 {
53 m_Material = core::ResourceManager::Instance()->GetAssetData<render::MaterialInstance>(materialId);
54 }
55}
56
57//-----------------------
58// ModelComponent::c-tor

Callers

nothing calls this directly

Calls 1

GetTypeMethod · 0.45

Tested by

no test coverage detected