mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
Solution Cleanup + TChinese template file by 柚子
This commit is contained in:
1 parent
fd5240c0ee
commit
07a21e9935
468 files changed
+68826
-51464
No files matched your search
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user