public void Initialize() { Settings.Configure(); HooksSetup.InstallHooks(Any_TextChanged); AutoTranslateClient.Configure(); LoadTranslations(); // start a thread that will periodically removed unused references var t1 = new Thread(RemovedUnusedReferences); t1.IsBackground = true; t1.Start(); // start a thread that will periodically save new translations var t2 = new Thread(SaveTranslationsLoop); t2.IsBackground = true; t2.Start(); // subscribe to text changes UGUIHooks.TextAwakened += UguiTextEvents_OnTextAwaken; UGUIHooks.TextChanged += UguiTextEvents_OnTextChanged; IMGUIHooks.TextChanged += IMGUITextEvents_GUIContentChanged; NGUIHooks.TextChanged += NGUITextEvents_TextChanged; TextMeshProHooks.TextAwakened += TextMeshProHooks_OnTextAwaken; TextMeshProHooks.TextChanged += TextMeshProHooks_OnTextChanged; }
public void Initialize() { Current = this; Settings.Configure(); HooksSetup.InstallHooks(Override_TextChanged); AutoTranslateClient.Configure(); _symbolCheck = TextHelper.GetSymbolCheck(Settings.FromLanguage); LoadTranslations(); // start a thread that will periodically removed unused references var t1 = new Thread(RemovedUnusedReferences); t1.IsBackground = true; t1.Start(); // start a thread that will periodically save new translations var t2 = new Thread(SaveTranslationsLoop); t2.IsBackground = true; t2.Start(); }
public void Initialize() { Current = this; Logger.Current = new ConsoleLogger(); Settings.Configure(); if (Settings.EnableConsole) { DebugConsole.Enable(); } HooksSetup.InstallHooks(Override_TextChanged); try { _endpoint = KnownEndpoints.FindEndpoint(Settings.ServiceEndpoint); } catch (Exception e) { Logger.Current.Error(e, "An unexpected error occurred during initialization of endpoint."); } _symbolCheck = TextHelper.GetSymbolCheck(Settings.FromLanguage); LoadTranslations(); // start a thread that will periodically removed unused references var t1 = new Thread(MaintenanceLoop); t1.IsBackground = true; t1.Start(); // start a thread that will periodically save new translations var t2 = new Thread(SaveTranslationsLoop); t2.IsBackground = true; t2.Start(); }
public TextAssetLoadedHandler() { HooksSetup.InstallTextAssetHooks(); }