23 lines
730 B
C#
23 lines
730 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
public class IndicatorInfo : MonoBehaviourSingletonTemplate<IndicatorInfo>
|
|
{
|
|
[RuntimeInitializeOnLoadMethod]
|
|
static void OnRuntimeMethodLoad()
|
|
{
|
|
var go = new GameObject("IndicatorInfo").AddComponent<IndicatorInfo>();
|
|
DontDestroyOnLoad(go.gameObject);
|
|
}
|
|
|
|
public void Make_Indicator(string indicatorName, Action<GameObject> action)
|
|
{
|
|
AddrResourceMgr.Ins.LoadObject<GameObject>($"Assets/Res_Addr/Obj/{indicatorName}.prefab", handle =>
|
|
{
|
|
var go = DSUtil.Get_Clone(handle.Result);
|
|
go.transform.parent = transform;
|
|
AddrResourceMgr.Ins.Set_AddressableReleaseSelf(go);
|
|
action(go);
|
|
});
|
|
}
|
|
} |