Update TextMeshProUGUI_Patch.cs
This commit is contained in:
parent
e239fdde17
commit
c892bb7900
1 changed files with 11 additions and 5 deletions
|
|
@ -17,10 +17,13 @@ namespace PvZ_Fusion_Translator.Patches.BaseTextObjects
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(__instance.text))
|
if (!string.IsNullOrEmpty(__instance.text))
|
||||||
{
|
{
|
||||||
if(__instance.transform.parent.parent.name.Contains("AbyssBagMenu"))
|
if(__instance.transform.parent.parent != null)
|
||||||
{
|
{
|
||||||
return;
|
if (__instance.transform.parent.parent.name.Contains("AbyssBagMenu"))
|
||||||
}
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
__instance = StringStore.TranslateText(__instance);
|
__instance = StringStore.TranslateText(__instance);
|
||||||
__instance.autoSizeTextContainer = false;
|
__instance.autoSizeTextContainer = false;
|
||||||
|
|
@ -50,9 +53,12 @@ namespace PvZ_Fusion_Translator.Patches.BaseTextObjects
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(__instance.text))
|
if (!string.IsNullOrEmpty(__instance.text))
|
||||||
{
|
{
|
||||||
if (__instance.transform.parent.parent.name.Contains("AbyssBagMenu"))
|
if (__instance.transform.parent.parent != null)
|
||||||
{
|
{
|
||||||
return;
|
if (__instance.transform.parent.parent.name.Contains("AbyssBagMenu"))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__instance = StringStore.TranslateText(__instance);
|
__instance = StringStore.TranslateText(__instance);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue