public override bool Init() { Instance = this; try { InitConsole(); AutoCompleter.Init(); ResetConsole(false); // Make sure compiler is supported on this platform Evaluator.Compile("new object();"); return(true); } catch (Exception e) { string info = "The C# Console has been disabled because"; if (e is NotSupportedException && e.TargetSite?.Name == "DefineDynamicAssembly") { info += " Reflection.Emit is not supported."; } else { info += $" of an unknown error.\r\n({e.ReflectionExToString()})"; } ExplorerCore.LogWarning(info); this.RefNavbarButton.GetComponentInChildren <Text>().text += " (disabled)"; return(false); } }
public override void Update() { UpdateConsole(); AutoCompleter.Update(); #if CPP Il2CppCoroutine.Process(); #endif }
public void UseAutocomplete(string suggestion) { string input = InputField.text; input = input.Insert(m_lastCaretPos, suggestion); InputField.text = input; m_fixCaretPos = m_lastCaretPos += suggestion.Length; var color = InputField.selectionColor; m_lastSelectAlpha = color.a; color.a = 0f; InputField.selectionColor = color; AutoCompleter.ClearAutocompletes(); }
public override bool Init() { Instance = this; try { InitConsole(); AutoCompleter.Init(); #if MONO DummyBehaviour.Setup(); #endif ResetConsole(false); // Make sure compiler is supported on this platform Evaluator.Compile(""); return(true); } catch (Exception e) { string info = "The C# Console has been disabled because"; if (e is NotSupportedException && e.TargetSite?.Name == "DefineDynamicAssembly") { info += " Reflection.Emit is not supported."; } else { info += $" of an unknown error.\r\n({e.ReflectionExToString()})"; } ExplorerCore.LogWarning(info); return(false); } }
internal void UpdateAutocompletes() { AutoCompleter.CheckAutocomplete(); AutoCompleter.SetSuggestions(AutoCompletes.ToArray()); }
public override void Update() { UpdateConsole(); AutoCompleter.Update(); }