FMaterialFunctionLibrary
Process-wide function resolver. Compile-time inlining reaches functions by path from wherever a graph compiles — the editor, MaterialAsset::CreateGPU at runtime, the headless test host — so resolution is one static lookup: a registered in-memory function wins (the tests and the function editor's unsaved document use that), then the VFS (the shipped set lives in EngineContent.meaf under Content/MaterialFunctions/ and a project's own functions under its Content mount, which shadows it), then a native path. Loaded functions are cached until Invalidate/InvalidateAll — a function save calls the latter, because callers may hold the path in any of its spellings.
- Module
- AssetSystem
- Header
#include "AssetSystem/Assets/MaterialFunction.h"- Namespace
Mowo
Properties
| Type | Name | Description |
|---|---|---|
static constexpr const char* | kEngineFunctionDir | The shipped starter set's mount, where the palette lists them from. Default "Content/MaterialFunctions". |
Public functions
| Returns | Name | Description |
|---|---|---|
std::shared_ptr<const FMaterialFunction> | Find | |
void | Register | |
void | Invalidate | |
void | InvalidateAll | |
std::string | NormalizePath | Forward slashes, no leading "./"; the key every lookup and every registration is folded to. |
Function details
Find
static std::shared_ptr<const FMaterialFunction> Find(const std::string& path)Register
static void Register(const std::string& path, const FMaterialFunction& function)Invalidate
static void Invalidate(const std::string& path)InvalidateAll
static void InvalidateAll()NormalizePath
static std::string NormalizePath(const std::string& path)Forward slashes, no leading "./"; the key every lookup and every registration is folded to.