FConsoleVariable::OnChangedCallback was changed to a multicast delegate in 4.26.
Along with this, FConsoleVariableBase::SetOnChangedCallback was implemented to emulate a single delegate for compatibility, but it actually behaves incompatibly.
The following workaround works
virtual void SetOnChangedCallback(const FConsoleVariableDelegate& Callback) { OnChangedCallback.Remove(LegacyDelegateHandle); #if 0 OnChangedCallback.Add(Callback); #else LegacyDelegateHandle = OnChangedCallback.Add(Callback); #endif }
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-118429 in the post.
0 |
Component | UE - Niagara |
---|---|
Target Fix | 5.0 |
Created | Jun 17, 2021 |
---|---|
Resolved | Jan 31, 2022 |
Updated | Jan 26, 2023 |