0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00
2023-03-03 18:52:31 +00:00

29 lines
634 B
C#

using UnityEngine;
namespace Aki.Reflection.Utils
{
public static class HookObject
{
public static GameObject _object
{
get
{
GameObject result = GameObject.Find("Aki.Hook");
if (result == null)
{
result = new GameObject("Aki.Hook");
Object.DontDestroyOnLoad(result);
}
return result;
}
}
public static T AddOrGetComponent<T>() where T : MonoBehaviour
{
return _object.GetOrAddComponent<T>();
}
}
}