Method Register
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
Register(string, FilterFunctionDefinition?)
Registers definition under name for
filter-[name:args] resolution. Re-registering a live name logs a warning and
overwrites; re-registering the identical definition under the same name is a silent no-op.
public static void Register(string name, FilterFunctionDefinition? definition)
Parameters
namestringFilter name as written inside the class brackets. Must be non-empty and must not contain whitespace,
:,[or](they would break the class token); the built-in filter family names (blur, brightness, contrast, grayscale, hue-rotate, invert, saturate, sepia) are reserved case-insensitively. Invalid names are rejected with a warning.definitionFilterFunctionDefinitionThe custom filter definition applied when the class resolves. Null (or a destroyed asset) is rejected with a warning, as is a definition declaring more than the 4 parameters a filter function can carry.