public struct MeshRenderableAn entity that draws a mesh asset.
As a scene component
- Size
- 24 bytes — 455 rows in a 16 KB chunk, alone on the archetype
Remarks
Two references and nothing else. Which geometry and which material, both as the vx: identity an asset keeps when its file is renamed. Where it is and how big comes from the transform; what it looks like is the material's; how it is cut into meshlets and packed into buffers is the model compiler's. This says only which asset the entity is an instance of.
An AssetReference rather than a bare AssetId, because a model is not one mesh. An FBX imports to a main object and a sub-asset per mesh, and what an entity draws is usually one of the parts — characters/hero#Hero_Mesh, whose reference is the asset's id and that part's sub-asset id. A bare id could only ever name the main object.
Drawn through Meshes. The reference resolves the way every other one does — ContentCatalog turns it into an address and AssetManager turns that into a MeshData — and the extraction system asks for it rather than waiting, so a mesh that has not arrived leaves the entity without a RenderHandle and is asked about again next frame. A host that sets no source draws no referenced mesh at all, which is what a project with no content mounted is.
The material resolves the same way, through Materials: the compiled MaterialContent the build wrote becomes a Material, its textures reach the frame's table, and the entity is drawn with it. An entity that names none is drawn with Material, which is what Material's own remarks say null means.
Fields and properties (3)
public AssetReference MeshWhich mesh, as the reference a scene stores.
public AssetReference MaterialWhich material, or Null for the renderer's default.
public bool CastsShadowsWhether it is drawn into the shadow stages as well as the shading ones.
Used by (19)
- ArenaThirdPersonShooter
- PlayerRigThirdPersonShooter
- ComponentRegistrationVixen.Rendering
- LightExtractionTestsVixen.Rendering.Tests
- MeshExtractionSystemVixen.Rendering
- MeshRenderablesVixen.Rendering
- TerrainSplineSpawnerVixen.Rendering.Terrain
- TerrainSplineSpawnerTestsVixen.Rendering.Terrain.Tests
- TypeRegistrationVixen.Rendering
- Vixen_Rendering_Ecs_MeshRenderableSerializerVixen.Rendering
- WorldRendererTestsVixen.Engine.Renderer.Tests
- BlockoutBooleanTestsVixen.Editor.Blockout.Tests
- BlockoutHandoffVixen.Editor.Blockout
- ComponentTestsVixen.Editor.App.Tests
- DropIntoFieldTestsVixen.Editor.App.Tests
- MaterialIconsVixen.Editor.App
- SceneMaterialTestsVixen.Editor.SceneView.Tests
- SceneMeshesVixen.Editor.SceneView
- SceneRenderComponentTestsVixen.Editor.Assets.Tests