mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
17 lines
432 B
C#
17 lines
432 B
C#
using UnityEngine;
|
|
|
|
namespace BetterAmongUs;
|
|
|
|
public static class ObjectHelper
|
|
{
|
|
public static void DestroyTranslator(this GameObject obj)
|
|
{
|
|
var translator = obj.GetComponent<TextTranslatorTMP>();
|
|
if (translator != null)
|
|
{
|
|
UnityEngine.Object.Destroy(translator);
|
|
}
|
|
}
|
|
public static void DestroyTranslator(this MonoBehaviour obj) => obj.gameObject.DestroyTranslator();
|
|
}
|