class
FPhysicsMaterialAsset
Physics materials as .physmat assets: a designer authors "Ice" once and every collider that references it gets the same friction, restitution, density, combine modes and surface type. Colliders keep their inline fields as the no-asset fallback, so existing scenes are unaffected.
- Module
- Physics
- Header
#include "Physics/PhysicsMaterialAsset.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
std::string | SerializeToString | |
bool | DeserializeFromString | |
bool | SaveToFile | |
bool | LoadFromFile | |
bool | Resolve | VFS path -> material, memoized. |
void | ClearCache | |
uint64_t | GetCacheGeneration | Bumped by ClearCache. |
Function details
SerializeToString
C++
static std::string SerializeToString(const PhysicsMaterial& material)DeserializeFromString
C++
static bool DeserializeFromString(const std::string& text, PhysicsMaterial& out)SaveToFile
C++
static bool SaveToFile(const PhysicsMaterial& material, const std::string& path)LoadFromFile
C++
static bool LoadFromFile(PhysicsMaterial& out, const std::string& path)Resolve
C++
static bool Resolve(const std::string& path, PhysicsMaterial& out)VFS path -> material, memoized. Returns false and leaves out untouched when the asset is missing or unparseable, so a bad reference degrades to the collider's inline material instead of to a default one.
ClearCache
C++
static void ClearCache()GetCacheGeneration
C++
static uint64_t GetCacheGeneration()Bumped by ClearCache. A caller that memoizes a Resolve result keys it on this, so dropping the cache reaches every copy instead of only this one.
Generated from Physics/PhysicsMaterialAsset.h via physics.json · Nov 4, 2026Version 1.0.0