internal void SetOnChangedCallback(IConsoleVariable consoleVariable, FConsoleVariableDelegate callback) { if (consoleVariable == null) { return; } ManagedVariableChangedHandler handler = new ManagedVariableChangedHandler(callback); managedVariableOnChangedHandlers[consoleVariable.Address] = handler; Native_IConsoleVariable.SetOnChangedCallback(consoleVariable.Address, handler.NativeCallback); }
private void OnVariableChanged(IntPtr consoleVariablePtr) { IConsoleVariable consoleVariable = null; if (consoleVariablePtr != IntPtr.Zero) { consoleVariable = new IConsoleVariable(consoleVariablePtr); } if (Handler != null) { Handler(consoleVariable); } }