MeshComponent struct in Thread

Holds a path to a mesh asset (FBX / OBJ / GLTF / GLB / precompiled .tmesh) and the cached GPU-uploaded Mesh. Drop a mesh from the Content Browser onto an entity to set this up automatically.

Properties

FilePathstd::stringVirtual path of the source mesh. Runtime auto-redirects to .tmesh sibling when present.
MeshDatastd::shared_ptr<Mesh>Cached Mesh instance from AssetManager::GetMesh.
EnabledboolRenderer skips the entity when false. Default true.

Notes

For multi-material meshes attach a MaterialComponent and fill its Slots array — one entry per Mesh material slot. See the Asset Pipeline for the .tmesh format.

Example

auto& mc = e.AddComponent<Thread::MeshComponent>();
mc.FilePath = "assets/models/character.fbx";
mc.MeshData = Thread::AssetManager::GetMesh(mc.FilePath);

MeshComponent struct w Thread

Przechowuje ścieżkę do assetu siatki (FBX / OBJ / GLTF / GLB / prekompilowany .tmesh) oraz zbuforowany Mesh wysłany na GPU. Upuść siatkę z Content Browsera na encję, a skonfiguruje się to samo.

Właściwości

FilePathstd::stringWirtualna ścieżka siatki źródłowej. W czasie działania automatycznie przekierowuje na sąsiedni .tmesh, jeśli istnieje.
MeshDatastd::shared_ptr<Mesh>Zbuforowana instancja Mesh z AssetManager::GetMesh.
EnabledboolGdy false, renderer pomija encję. Domyślnie true.

Uwagi

Dla siatek z wieloma materiałami podepnij MaterialComponent i wypełnij jego tablicę Slots — jeden wpis na slot materiału siatki. Format .tmesh opisuje Potok zasobów.

Przykład

auto& mc = e.AddComponent<Thread::MeshComponent>();
mc.FilePath = "assets/models/character.fbx";
mc.MeshData = Thread::AssetManager::GetMesh(mc.FilePath);