Kaynağa Gözat

removed twice overriden hooks

randoman 6 yıl önce
ebeveyn
işleme
bc24349660

+ 4 - 0
README.md

@@ -14,6 +14,8 @@
 ## Notice
 The latest version (2.16.0+) now also supports basic image loading/dumping. These are not automatically translated and the feature is disabled by default.
 
+This feature is primarily meant for games with little to no mod support to enable full translations without needing to modify resource files.
+
 If you are going to make use of this feature, please make sure you read and understand the [Texture Translation](#texture-translation) section!
 
 ## Text Frameworks
@@ -200,6 +202,8 @@ Often other mods UI are implemented through IMGUI. As you can see above, this is
 ## Texture Translation
 From version 2.16.0+ this mod provides basic capabilities to replace images. It is a feature that is disabled by default. There is no automatic translation of these images though.
 
+This feature is primarily meant for games with little to no mod support to enable full translations without needing to modify resource files.
+
 It is controlled by the following configuration:
 
 ```ini

+ 0 - 5
src/XUnity.AutoTranslator.Plugin.Core/Hooks/HooksSetup.cs

@@ -122,7 +122,6 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
          {
             if( Settings.EnableUGUI || Settings.EnableUtage )
             {
-               UGUIHooks.HooksOverriden = SetupHook( KnownEvents.OnUnableToTranslateUGUI, AutoTranslationPlugin.Current.ExternalHook_TextChanged_WithResult );
                _harmony.PatchAll( UGUIHooks.All );
             }
          }
@@ -135,7 +134,6 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
          {
             if( Settings.EnableTextMeshPro )
             {
-               TextMeshProHooks.HooksOverriden = SetupHook( KnownEvents.OnUnableToTranslateTextMeshPro, AutoTranslationPlugin.Current.ExternalHook_TextChanged_WithResult );
                _harmony.PatchAll( TextMeshProHooks.All );
             }
          }
@@ -148,7 +146,6 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
          {
             if( Settings.EnableNGUI )
             {
-               NGUIHooks.HooksOverriden = SetupHook( KnownEvents.OnUnableToTranslateNGUI, AutoTranslationPlugin.Current.ExternalHook_TextChanged_WithResult );
                _harmony.PatchAll( NGUIHooks.All );
             }
          }
@@ -161,8 +158,6 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
          {
             if( Settings.EnableIMGUI )
             {
-               IMGUIHooks.HooksOverriden = SetupHook( KnownEvents.OnUnableToTranslateIMGUI, AutoTranslationPlugin.Current.ExternalHook_TextChanged_WithResult );
-
                _harmony.PatchAll( IMGUIHooks.All );
 
                // This wont work in "newer" unity versions!