using System; using System.Collections.Generic; namespace BehaviorTreeSlayer { public class SlayerUtils { static Dictionary> dic = new Dictionary>(); public static Dictionary> Dic => dic; public static void RegistCustomParser(Func func) { Type key = typeof(T); if (dic.ContainsKey(key)) { dic[key] = func; } else { dic.Add(key, func); } } } }