Fix stuff

This commit is contained in:
Gurge44 committed 2024-06-10 11:02:21 +02:00
1 parent de62db8bec
commit 097cc8e307
12 files changed
+49 -43

No files matched your search

+2 -8
View File
@@ -1,13 +1,9 @@
using HarmonyLib;
using UnityEngine;
namespace EHR;
public static class ObjectHelper
{
/// <summary>
/// オブジェクトの<see cref="TextTranslatorTMP"/>コンポーネントを破棄します
/// </summary>
public static void DestroyTranslator(this GameObject obj)
{
if (obj == null) return;
@@ -15,8 +11,6 @@ public static class ObjectHelper
TextTranslatorTMP[] translator = obj.GetComponentsInChildren<TextTranslatorTMP>(true);
translator?.Do(Object.Destroy);
}
/// <summary>
/// オブジェクトの<see cref="TextTranslatorTMP"/>コンポーネントを破棄します
/// </summary>
public static void DestroyTranslator(this MonoBehaviour obj) => obj?.gameObject?.DestroyTranslator();
public static void DestroyTranslator(this MonoBehaviour obj) => obj?.gameObject.DestroyTranslator();
}