浏览代码

fixed bug caused by NGUI

Scrublord1336 6 年之前
父节点
当前提交
5fee55ae52
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/XUnity.AutoTranslator.Plugin.Core/AutoTranslationPlugin.cs

+ 4 - 0
src/XUnity.AutoTranslator.Plugin.Core/AutoTranslationPlugin.cs

@@ -701,6 +701,10 @@ namespace XUnity.AutoTranslator.Plugin.Core
                // NGUI only behaves if you set the text after the resize behaviour
                ui.SetText( text );
             }
+            catch( TargetInvocationException )
+            {
+               // might happen with NGUI
+            }
             catch( NullReferenceException )
             {
                // This is likely happened due to a scene change.