public void OnGUI() { try { if (Event.current.type != EventType.KeyUp) { return; } if (!Event.current.alt) { return; } switch (Event.current.keyCode) { case KeyCode.F1: TranslateConfig.Reload(); Resource.Reload(); ReTranslation(); Logger.Log(LogLevel.Info, $"Config reloaded."); break; case KeyCode.F5: TranslateConfig.IsDumpingText = !TranslateConfig.IsDumpingText; Logger.Log(LogLevel.Info, $"Dumping text {(TranslateConfig.IsDumpingText ? "Enabled" : "Disabled")}."); break; case KeyCode.F6: TranslateConfig.IsDumpingTexture = !TranslateConfig.IsDumpingTexture; Logger.Log(LogLevel.Info, $"Dumping texture {(TranslateConfig.IsDumpingTexture ? "Enabled" : "Disabled")}."); break; case KeyCode.F7: TranslateConfig.IsDumpingUI = !TranslateConfig.IsDumpingUI; Logger.Log(LogLevel.Info, $"Dumping ui {(TranslateConfig.IsDumpingUI ? "Enabled" : "Disabled")}."); break; case KeyCode.F8: TranslateConfig.IsDumpingSprite = !TranslateConfig.IsDumpingSprite; Logger.Log(LogLevel.Info, $"Dumping sprite {(TranslateConfig.IsDumpingSprite ? "Enabled" : "Disabled")}."); break; case KeyCode.F9: Dumper.DumpResource(CurrentScene); break; case KeyCode.F10: Dumper.DumpObjects(CurrentScene); break; } } catch (Exception ex) { Logger.Log(LogLevel.Error, ex); throw; } }