class

FMeshRenderProxyCache

The game-thread half of the persistent render scene: one proxy per entity that draws through a MeshRenderer, holding what the mesh gather used to look up again for every entity on every view — five hashed component lookups and the collider's surface type, which for a collider naming a .mphysmat is a mutex-guarded cache lookup.

Module
Game
Header
#include "Scene/MeshRenderProxyCache.h"
Namespace
Mowo

The list is rebuilt only when the world's signature version moves. Every create, destroy, AddComponent, RemoveComponent, snapshot restore and world reset bumps it, and those are the only operations that move component storage, so a pointer taken under one version stays valid until the version changes. Field edits need no rebuild because the proxy reads the components live; the one derived value, the surface type, is re-resolved only when the collider's own fields or the physics-material cache generation change.

The proxy never holds a mesh or a material. Those are read through the MeshRenderer each frame, so an in-place asset hot reload that frees and replaces a mesh's internals can never leave a proxy pointing at the old one.

Public functions

ReturnsNameDescription
boolSyncBrings the proxies in line with the world; true when the list was rebuilt.
uint32_tResolveSurfaceTypeThe collider's surface type as a physics contact would resolve it, from the proxy's memo unless the collider or the material cache changed.
const std::vector<FProxy>&GetProxies
uint64_tGetSyncedVersionThe signature version the proxies were built under.
voidInvalidateForces the next Sync to rebuild, for a caller that swaps the world's contents behind its back.
uint64_tGetRebuildCount
uint64_tGetSurfaceResolveCount

Function details

Sync

C++
bool Sync(World& world)

Brings the proxies in line with the world; true when the list was rebuilt.

ResolveSurfaceType

C++
uint32_t ResolveSurfaceType(const FProxy& proxy)

The collider's surface type as a physics contact would resolve it, from the proxy's memo unless the collider or the material cache changed.

GetProxies

C++
const std::vector<FProxy>& GetProxies() const

GetSyncedVersion

C++
uint64_t GetSyncedVersion() const

The signature version the proxies were built under. A caller walking the list stops the moment the world's version differs from it.

Invalidate

C++
void Invalidate()

Forces the next Sync to rebuild, for a caller that swaps the world's contents behind its back.

GetRebuildCount

C++
uint64_t GetRebuildCount() const

GetSurfaceResolveCount

C++
uint64_t GetSurfaceResolveCount() const
Generated from Scene/MeshRenderProxyCache.h via game.json · Nov 5, 2026Version 1.0.0