Solution Cleanup + TChinese template file by 柚子

This commit is contained in:
Gurge44 committed 2024-10-30 11:58:29 +01:00
1 parent fd5240c0ee
commit 07a21e9935
468 files changed
+68826 -51464

No files matched your search

+20 -11
View File
@@ -1,16 +1,25 @@
using Il2CppSystem;
using UnityEngine;
namespace EHR;
public static class ObjectHelper
namespace EHR
{
public static void DestroyTranslator(this GameObject obj)
public static class ObjectHelper
{
if (obj == null) return;
obj.ForEachChild((Il2CppSystem.Action<GameObject>)DestroyTranslator); // False error
TextTranslatorTMP[] translator = obj.GetComponentsInChildren<TextTranslatorTMP>(true);
translator?.Do(Object.Destroy);
}
public static void DestroyTranslator(this GameObject obj)
{
if (obj == null)
{
return;
}
public static void DestroyTranslator(this MonoBehaviour obj) => obj?.gameObject.DestroyTranslator();
}
obj.ForEachChild((Action<GameObject>)DestroyTranslator); // False error
TextTranslatorTMP[] translator = obj.GetComponentsInChildren<TextTranslatorTMP>(true);
translator?.Do(Object.Destroy);
}
public static void DestroyTranslator(this MonoBehaviour obj)
{
obj?.gameObject.DestroyTranslator();
}
}
}