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);
        }
示例#2
0
        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);
        }
示例#3
0
        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();
        }
示例#4
0
 public void SetOnChangedCallback(FConsoleVariableDelegate callback)
 {
     IConsoleManager.Get().SetOnChangedCallback(this, callback);
 }