This commit is contained in:
Gurge44 committed 2024-06-10 15:46:16 +02:00
1 parent 7baa961a54
commit 8aa47b7163
5 files changed
+11 -9

No files matched your search

+3 -3
View File
@@ -7,10 +7,10 @@ public static class ObjectHelper
public static void DestroyTranslator(this GameObject obj)
{
if (obj == null) return;
obj.ForEachChild((Il2CppSystem.Action<GameObject>)DestroyTranslator);
obj.ForEachChild((Il2CppSystem.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();
}
}