✏️Modifiers
Modifiers allow you to change the values before they are set or retrieved by requesters. Modifiers provide flexibility in manipulating the bound values. Like converters, modifiers are relatively simple to implement and extend.
To add a new modifier, it is sufficient to implement the IModifier<T>
interface:
The system will automatically pick up the new modifier and make it available in Bind Menu. To avoid auto registration of the new modifier, add [HideMember]
attribute over the class.
Sometimes the system will need another recompilation round to successfully register the new modifier.
The modifier must have a parameterless constructor.
For new numeric modifiers, we suggest extending NumericModifier
for simplicity. It only requires to implement a simple Modify(double)
method and optionally another Modify(long)
method to cover all numeric modification cases.
Most of the modifiers have their code exposed, this is to allow users to change them at their heart's content.
Last updated