Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Source/Runtime/Core/Public/HAL/IConsoleManager.h |
Include |
#include "HAL/IConsoleManager.h" |
void SetOnChangedCallback
(
const FConsoleVariableDelegate & Callback
)
Allows to specify a callback function that is called when the console variable value changes. Is even called if the value is the same as the value before. Will always be on the game thread. This can be dangerous (instead try to use RegisterConsoleVariableSink())
Setting other console variables in the delegate can cause infinite loops
Setting many console variables could result in wasteful cycles (e.g. if multiple console variables require to reattach all objects it would happen for each one)
The call can be at any time during initialization. As this cannot be specified during constructions you are not called on creation. We also don't call for the SetOnChangedCallback() call as this is up to the caller.