class
MStaticMeshComponent
- Module
- Game
- Header
#include "Game/MStaticMeshComponent.h"- Namespace
Mowo- Reflection
- Reflected by MowoHeaderTool
Properties
| Type | Name | Description |
|---|---|---|
std::string | meshPath | Asset reference — path to the .mmodel. |
std::string | meshType | Primitive type name (GPUMesh::PrimitiveTypes: "cube", "sphere", "plane", "cylinder", "capsule", "cone", "quad", "torus", "wedge", "stairs", "mannequin") — same vocabulary as MeshRendererComponent::meshType. Empty for file-based meshes. |
std::string | materialPath | |
bool | castShadows | Default true. |
bool | receiveShadows | Default true. |
bool | renderCustomDepth | Default false. |
int32_t | customStencil | Default 0. |
bool | receiveDecals | Default true. |
bool | visible | Default true. |
Constructors
| Signature | Name | Description |
|---|---|---|
MStaticMeshComponent() | MStaticMeshComponent | member-cleanup path), and this header only forward-declares it. |
~MStaticMeshComponent() override | ~MStaticMeshComponent |
Public functions
| Returns | Name | Description |
|---|---|---|
void | OnRegister | Mirror MeshRenderer state onto the owner's backing ECS entity. |
void | PullFromMirror | |
void | SetMeshPrimitive | Runtime mesh switching — set the source and re-mirror in one call (the OnRegister mirror only runs once at spawn; changes after that must go through these or the entity keeps drawing the old mesh). |
void | SetMeshPath | |
void | RefreshMirror | Re-push meshType/meshPath/visible onto the mirrored MeshRendererComponent (including hydration). |
bool | GetSocketLocalTransform | Sockets are the NAMED transforms the mesh itself carries (its .mmeshmeta) — a muzzle, a door handle, a roof mount. |
Function details
MStaticMeshComponent
C++
MStaticMeshComponent()member-cleanup path), and this header only forward-declares it.
~MStaticMeshComponent
C++
~MStaticMeshComponent() overrideOnRegister
C++
void OnRegister() overrideMirror MeshRenderer state onto the owner's backing ECS entity.
PullFromMirror
C++
void PullFromMirror(World* ecs, EntityID entity) overrideSetMeshPrimitive
C++
void SetMeshPrimitive(const std::string& type)Runtime mesh switching — set the source and re-mirror in one call (the OnRegister mirror only runs once at spawn; changes after that must go through these or the entity keeps drawing the old mesh).
SetMeshPath
C++
void SetMeshPath(const std::string& path)RefreshMirror
C++
void RefreshMirror() overrideRe-push meshType/meshPath/visible onto the mirrored MeshRendererComponent (including hydration). No-op before OnRegister or without a backing entity.
GetSocketLocalTransform
C++
bool GetSocketLocalTransform(const std::string& socketName, Vec3& outPos, Quat& outRot) const overrideSockets are the NAMED transforms the mesh itself carries (its .mmeshmeta) — a muzzle, a door handle, a roof mount. The base class answers false for everything, which is why attaching to anything but a skeletal bone used to be impossible.
Generated from Game/MStaticMeshComponent.h via game.json · Nov 5, 2026Version 1.0.0