internal static void OnNativeFunctionsRegistered() { IConsoleManager.Get().RegisterConsoleCommand("USharpGen", "USharp generate C# code", GenerateCode); //IConsoleManager.Get().RegisterConsoleCommand("USharpGenSliced", "USharp generate C# code", GenerateCodeTimeSliced); IConsoleManager.Get().RegisterConsoleCommand("USharpMinHotReload", "USharp hotreload will skip reintancing / CDO checks", SetMinimalHotReload); }
internal static void OnNativeFunctionsRegistered() { IConsoleManager.Get().RegisterConsoleCommand("USharpGen", "USharp generate C# code", GenerateCode); // Move these commands somewhere else? IConsoleManager.Get().RegisterConsoleCommand("USharpRuntime", "Sets the .NET runtime that USharp will use (Mono/CLR)", SetDotNetRuntime); IConsoleManager.Get().RegisterConsoleCommand("USharpMinHotReload", "USharp hotreload will skip reintancing / CDO checks", SetMinimalHotReload); }
internal static void OnUnload() { IConsoleManager consoleManager = IConsoleManager.Get(); foreach (var command in new Dictionary <IntPtr, ManagedCommand>(managedCommands)) { consoleManager.UnregisterConsoleObject(command.Value.NativeCommand); } foreach (var handler in new Dictionary <FDelegateHandle, FConsoleCommandDelegate>(managedVariableSinkHandlers)) { consoleManager.UnregisterConsoleVariableSink(handler.Key); } foreach (var handler in new Dictionary <IntPtr, ManagedVariableChangedHandler>(managedVariableOnChangedHandlers)) { consoleManager.UnregisterConsoleObject(new IConsoleVariable(handler.Key)); } managedVariableOnChangedHandlers.Clear(); managedVariableSinkHandlers.Clear(); managedCommands.Clear(); }
public void SetOnChangedCallback(FConsoleVariableDelegate callback) { IConsoleManager.Get().SetOnChangedCallback(this, callback); }