问题
我现在的情景就是
我给某一个脚本的某个私有字段设置了 SerializeField 标签,然后我在 Unity 编辑器的监视器中拖动场景中的物体到了这个字段上,也就是设置了这个字段的值
然后在启动游戏时,大部分这个字段的实际值为 null,强行调用他的方法就会报错,极少的时候这个字段会有正确的值
例如我设置了一个对象池的引用,这个对象池的脚本是我自己写的
我也确保没有其他地方会修改它
我也确定我在监视器中设置了这个字段的值
我也确定我在监视器中设置了这个字段的值
点击这个字段,字段在场景中是可以用相应的黄色方框提示的
我也用搜索确定了,场景中与这个报错的,获取不到我在监视器中配置的值的脚本,只挂载了一个物体
在游戏运行的过程中,我也没有销毁过我引用的对象池
Debug 尝试
具体到脚本来说,我是在 OnEliminateCueBegin 中使用的这个报空的对象池,然后我也在这个方法被调用之前 Debug 了一下,看看这个值是怎么样的,结果我发现,在 Start 中这个值是正常的,但是在之后实际用的时候这个值就为空了
在 Start 中的 Debug,打印出来是不为空
OnEliminateCueBegin 中调用的 EliminateTipTween,EliminateTipTween 中打印了 tipsPool,发现它为空
结果输出:
一开始不为空,最后为空
我还发现,他有的时候会有这种错误,有的时候没有,就很奇怪,有的时候我重启一下编辑器,在刚开始是正常的,之后再次启动游戏就不正常了
我还在 Update 中 Debug 输出字段是否为 null
结果是他一直为 False
这就说明在错误发生之前和之后都是有值的……
然后我现在把这个对象池脚本和要使用它的脚本挂在一起,并且我还在判断到为 null 的时候再获取一次
判断到为 null 的时候再获取一次的代码:
结果仍然是没有引用,现在变成了这个挂载脚本的物体本身缺失了引用
总之我感觉我确实各种方法都用过了,就是不知道哪里错了
MissingReferenceException 似乎不能用 var == null 来判断
看到别人的帖子,MissingReferenceException 指的是 Unity 自己把一个 Unity 对象销毁了,但是 Unity 销毁的对象还可能留有一部分数据,所以这个时候用 null 来判断他,也可能判断出来不为空
stackoverflow.com/questions/5…
写全绑定与解绑
之后我看到别人的帖子
他这里说他是销毁过物体的,所以很明显是销毁物体的时候没有解绑导致的
虽然我对我这个物体很自信,他从游戏开始就不会被销毁,但是我还是写全了绑定和解绑试试,一开始我是没有写全的
private void OnEnable()
{
EventManager.Add<ResChess, List<ResChess>>(EventName.OnEliminateCueBegin, OnEliminateCueBegin);
}
private void OnDisable()
{
EventManager.Remove<ResChess, List<ResChess>>(EventName.OnEliminateCueBegin, OnEliminateCueBegin);
}
结果神奇的事情就发生了,这个 MissingReferenceException 的错误就真的再也没有了……
ExecuteAlways
之后想到了问题
事件分发器写了个 ExecuteAlways 的标签,所以如果物体的方法绑定和解绑没有写全,所以上一次在编辑器中退出游戏调试后没有解绑一些方法,下一次进入游戏调试时就会调用上一次游戏的没解绑的方法,就会产生错误
这个事件分发器是我用的它们老项目的代码,我感觉它们是希望在写一些编辑器工具的时候也能调用这个 EventManager 的功能……? 虽然最终那个老项目也是个小游戏,比较简单,也没有写什么编辑器工具,但是他就是写了个这么个标签
总结的话,事件的绑定与解绑一定要写全……
EventManager
既然都说到了自定义的事件分发器,或许这里也可以记录一下我的事件分发器
这是我参考别人写的 EventManager,可以使用 Action 和 Func 通过字符串来绑定事件,使用泛型来支持不同参数的 Action Func
using System;
using System.Collections.Generic;
using UnityEngine;
#region FuncInfo
public interface IFuncInfo
{
}
public class FuncInfo<T> : IFuncInfo
{
public Func<T> Funcs;
public FuncInfo(Func<T> func)
{
Funcs += func;
}
}
public class FuncInfo<T1, T2> : IFuncInfo
{
public Func<T1, T2> Funcs;
public FuncInfo(Func<T1, T2> func)
{
Funcs += func;
}
}
public class FuncInfo<T1, T2, T3> : IFuncInfo
{
public Func<T1, T2, T3> Funcs;
public FuncInfo(Func<T1, T2, T3> func)
{
Funcs += func;
}
}
public class FuncInfo<T1, T2, T3, T4> : IFuncInfo
{
public Func<T1, T2, T3, T4> Funcs;
public FuncInfo(Func<T1, T2, T3, T4> func)
{
Funcs += func;
}
}
public class FuncInfo<T1, T2, T3, T4, T5> : IFuncInfo
{
public Func<T1, T2, T3, T4, T5> Funcs;
public FuncInfo(Func<T1, T2, T3, T4, T5> func)
{
Funcs += func;
}
}
public class FuncInfo<T1, T2, T3, T4, T5, T6> : IFuncInfo
{
public Func<T1, T2, T3, T4, T5, T6> Funcs;
public FuncInfo(Func<T1, T2, T3, T4, T5, T6> func)
{
Funcs += func;
}
}
public class FuncInfo<T1, T2, T3, T4, T5, T6, T7> : IFuncInfo
{
public Func<T1, T2, T3, T4, T5, T6, T7> Funcs;
public FuncInfo(Func<T1, T2, T3, T4, T5, T6, T7> func)
{
Funcs += func;
}
}
public class FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8> : IFuncInfo
{
public Func<T1, T2, T3, T4, T5, T6, T7, T8> Funcs;
public FuncInfo(Func<T1, T2, T3, T4, T5, T6, T7, T8> func)
{
Funcs += func;
}
}
public class FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9> : IFuncInfo
{
public Func<T1, T2, T3, T4, T5, T6, T7, T8, T9> Funcs;
public FuncInfo(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9> func)
{
Funcs += func;
}
}
public class FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> : IFuncInfo
{
public Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Funcs;
public FuncInfo(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> func)
{
Funcs += func;
}
}
public class FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> : IFuncInfo
{
public Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Funcs;
public FuncInfo(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> func)
{
Funcs += func;
}
}
public class FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> : IFuncInfo
{
public Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Funcs;
public FuncInfo(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> func)
{
Funcs += func;
}
}
public class FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> : IFuncInfo
{
public Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Funcs;
public FuncInfo(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> func)
{
Funcs += func;
}
}
public class FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> : IFuncInfo
{
public Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Funcs;
public FuncInfo(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> func)
{
Funcs += func;
}
}
public class FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> : IFuncInfo
{
public Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Funcs;
public FuncInfo(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> func)
{
Funcs += func;
}
}
public class FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> : IFuncInfo
{
public Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Funcs;
public FuncInfo(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> func)
{
Funcs += func;
}
}
public class FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17> : IFuncInfo
{
public Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17> Funcs;
public FuncInfo(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17> func)
{
Funcs += func;
}
}
#endregion
#region ActionInfo
// 字典中定义 <string, 基类>
// 插入字典的是 <string, 子类>
// 这样可以实现一个字典
public interface IActionInfo
{
}
public class ActionInfo : IActionInfo
{
public Action Actions;
public ActionInfo(Action action)
{
Actions += action;
}
}
public class ActionInfo<T> : IActionInfo
{
public Action<T> Actions;
public ActionInfo(Action<T> action)
{
Actions += action;
}
}
public class ActionInfo<T1, T2> : IActionInfo
{
public Action<T1, T2> Actions;
public ActionInfo(Action<T1, T2> action)
{
Actions += action;
}
}
public class ActionInfo<T1, T2, T3> : IActionInfo
{
public Action<T1, T2, T3> Actions;
public ActionInfo(Action<T1, T2, T3> action)
{
Actions += action;
}
}
public class ActionInfo<T1, T2, T3, T4> : IActionInfo
{
public Action<T1, T2, T3, T4> Actions;
public ActionInfo(Action<T1, T2, T3, T4> action)
{
Actions += action;
}
}
public class ActionInfo<T1, T2, T3, T4, T5> : IActionInfo
{
public Action<T1, T2, T3, T4, T5> Actions;
public ActionInfo(Action<T1, T2, T3, T4, T5> action)
{
Actions += action;
}
}
public class ActionInfo<T1, T2, T3, T4, T5, T6> : IActionInfo
{
public Action<T1, T2, T3, T4, T5, T6> Actions;
public ActionInfo(Action<T1, T2, T3, T4, T5, T6> action)
{
Actions += action;
}
}
public class ActionInfo<T1, T2, T3, T4, T5, T6, T7> : IActionInfo
{
public Action<T1, T2, T3, T4, T5, T6, T7> Actions;
public ActionInfo(Action<T1, T2, T3, T4, T5, T6, T7> action)
{
Actions += action;
}
}
public class ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8> : IActionInfo
{
public Action<T1, T2, T3, T4, T5, T6, T7, T8> Actions;
public ActionInfo(Action<T1, T2, T3, T4, T5, T6, T7, T8> action)
{
Actions += action;
}
}
public class ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9> : IActionInfo
{
public Action<T1, T2, T3, T4, T5, T6, T7, T8, T9> Actions;
public ActionInfo(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9> action)
{
Actions += action;
}
}
public class ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> : IActionInfo
{
public Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Actions;
public ActionInfo(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> action)
{
Actions += action;
}
}
public class ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> : IActionInfo
{
public Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Actions;
public ActionInfo(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> action)
{
Actions += action;
}
}
public class ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> : IActionInfo
{
public Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Actions;
public ActionInfo(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> action)
{
Actions += action;
}
}
public class ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> : IActionInfo
{
public Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Actions;
public ActionInfo(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> action)
{
Actions += action;
}
}
public class ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> : IActionInfo
{
public Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Actions;
public ActionInfo(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> action)
{
Actions += action;
}
}
public class ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> : IActionInfo
{
public Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Actions;
public ActionInfo(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> action)
{
Actions += action;
}
}
public class ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> : IActionInfo
{
public Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Actions;
public ActionInfo(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> action)
{
Actions += action;
}
}
#endregion
#region EventManager
public static class EventManager
{
private static readonly Dictionary<string, IActionInfo> ActionDictionary = new();
private static readonly Dictionary<string, IFuncInfo> FuncDictionary = new();
#region Add Action
public static void Add(string actionName, Action action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo(action));
else if (ActionDictionary[actionName] is ActionInfo e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo));
#endif
}
public static void Add<T>(string actionName, Action<T> action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo<T>(action));
else if (ActionDictionary[actionName] is ActionInfo<T> e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T>));
#endif
}
public static void Add<T1, T2>(string actionName, Action<T1, T2> action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo<T1, T2>(action));
else if (ActionDictionary[actionName] is ActionInfo<T1, T2> e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2>));
#endif
}
public static void Add<T1, T2, T3>(string actionName, Action<T1, T2, T3> action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo<T1, T2, T3>(action));
else if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3> e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3>));
#endif
}
public static void Add<T1, T2, T3, T4>(string actionName, Action<T1, T2, T3, T4> action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo<T1, T2, T3, T4>(action));
else if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4> e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4>));
#endif
}
public static void Add<T1, T2, T3, T4, T5>(string actionName, Action<T1, T2, T3, T4, T5> action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo<T1, T2, T3, T4, T5>(action));
else if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5> e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6>(string actionName, Action<T1, T2, T3, T4, T5, T6> action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo<T1, T2, T3, T4, T5, T6>(action));
else if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6> e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7> action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo<T1, T2, T3, T4, T5, T6, T7>(action));
else if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7> e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8> action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8>(action));
else if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8> e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8, T9> action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9>(action));
else if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9> e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(action));
else if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(action));
else if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(action));
else if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(action));
else if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(action));
else if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(action));
else if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> action)
{
if (!ActionDictionary.ContainsKey(actionName))
ActionDictionary.Add(actionName, new ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(action));
else if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> e)
e.Actions += action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>));
#endif
}
#endregion
#region Add Func
public static void Add<T>(string funcName, Func<T> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T>(func));
else if (FuncDictionary[funcName] is FuncInfo<T> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T>));
#endif
}
public static void Add<T1, T2>(string funcName, Func<T1, T2> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T1, T2>(func));
else if (FuncDictionary[funcName] is FuncInfo<T1, T2> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2>));
#endif
}
public static void Add<T1, T2, T3>(string funcName, Func<T1, T2, T3> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T1, T2, T3>(func));
else if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3>));
#endif
}
public static void Add<T1, T2, T3, T4>(string funcName, Func<T1, T2, T3, T4> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T1, T2, T3, T4>(func));
else if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4>));
#endif
}
public static void Add<T1, T2, T3, T4, T5>(string funcName, Func<T1, T2, T3, T4, T5> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T1, T2, T3, T4, T5>(func));
else if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6>(string funcName, Func<T1, T2, T3, T4, T5, T6> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T1, T2, T3, T4, T5, T6>(func));
else if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T1, T2, T3, T4, T5, T6, T7>(func));
else if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8>(func));
else if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9>(func));
else if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(func));
else if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(func));
else if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(func));
else if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(func));
else if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(func));
else if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(func));
else if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(func));
else if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>));
#endif
}
public static void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17> func)
{
if (!FuncDictionary.ContainsKey(funcName))
FuncDictionary.Add(funcName, new FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17>(func));
else if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17> e)
e.Funcs += func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Add]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17>));
#endif
}
#endregion
#region Remove Action
public static void Remove(string actionName, Action action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
public static void Remove<T>(string actionName, Action<T> action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T> e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T>));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
public static void Remove<T1, T2>(string actionName, Action<T1, T2> action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2> e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2>));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
public static void Remove<T1, T2, T3>(string actionName, Action<T1, T2, T3> action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3> e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3>));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
public static void Remove<T1, T2, T3, T4>(string actionName, Action<T1, T2, T3, T4> action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4> e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4>));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5>(string actionName, Action<T1, T2, T3, T4, T5> action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5> e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5>));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6>(string actionName, Action<T1, T2, T3, T4, T5, T6> action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6> e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6>));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7> action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7> e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7>));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8> action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8> e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8>));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8, T9> action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9> e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9>));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(string actionName, Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> action)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> e)
e.Actions -= action;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>));
else
Debug.Log("[EventManager.Remove]: There is no " + actionName);
#endif
}
#endregion
#region Remove Func
public static void Remove<T>(string funcName, Func<T> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
public static void Remove<T1, T2>(string funcName, Func<T1, T2> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
public static void Remove<T1, T2, T3>(string funcName, Func<T1, T2, T3> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
public static void Remove<T1, T2, T3, T4>(string funcName, Func<T1, T2, T3, T4> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5>(string funcName, Func<T1, T2, T3, T4, T5> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6>(string funcName, Func<T1, T2, T3, T4, T5, T6> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
public static void Remove<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17>(string funcName, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17> func)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17> e)
e.Funcs -= func;
#if UNITY_EDITOR
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17>));
else
Debug.Log("[EventManager.Remove]: There is no " + funcName);
#endif
}
#endregion
#region Trigger Action
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger(string actionName)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo e)
if (e.Actions is not null)
e.Actions.Invoke();
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger<T>(string actionName, T info)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T> e)
if (e.Actions is not null)
e.Actions.Invoke(info);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T>));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger<T1, T2>(string actionName, T1 info1, T2 info2)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2> e)
if (e.Actions is not null)
e.Actions.Invoke(info1, info2);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2>));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger<T1, T2, T3>(string actionName, T1 info1, T2 info2, T3 info3)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3> e)
if (e.Actions is not null)
e.Actions.Invoke(info1, info2, info3);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3>));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger<T1, T2, T3, T4>(string actionName, T1 info1, T2 info2, T3 info3, T4 info4)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4> e)
if (e.Actions is not null)
e.Actions.Invoke(info1, info2, info3, info4);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4>));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger<T1, T2, T3, T4, T5>(string actionName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5> e)
if (e.Actions is not null)
e.Actions.Invoke(info1, info2, info3, info4, info5);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5>));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger<T1, T2, T3, T4, T5, T6>(string actionName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6> e)
if (e.Actions is not null)
e.Actions.Invoke(info1, info2, info3, info4, info5, info6);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6>));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger<T1, T2, T3, T4, T5, T6, T7>(string actionName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7> e)
if (e.Actions is not null)
e.Actions.Invoke(info1, info2, info3, info4, info5, info6, info7);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7>));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger<T1, T2, T3, T4, T5, T6, T7, T8>(string actionName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8> e)
if (e.Actions is not null)
e.Actions.Invoke(info1, info2, info3, info4, info5, info6, info7, info8);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8>));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9>(string actionName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8, T9 info9)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9> e)
if (e.Actions is not null)
e.Actions.Invoke(info1, info2, info3, info4, info5, info6, info7, info8, info9);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9>));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(string actionName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8, T9 info9, T10 info10)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> e)
if (e.Actions is not null)
e.Actions.Invoke(info1, info2, info3, info4, info5, info6, info7, info8, info9, info10);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(string actionName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8, T9 info9, T10 info10, T11 info11)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> e)
if (e.Actions is not null)
e.Actions.Invoke(info1, info2, info3, info4, info5, info6, info7, info8, info9, info10, info11);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(string actionName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8, T9 info9, T10 info10, T11 info11, T12 info12)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> e)
if (e.Actions is not null)
e.Actions.Invoke(info1, info2, info3, info4, info5, info6, info7, info8, info9, info10, info11, info12);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(string actionName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8, T9 info9, T10 info10, T11 info11, T12 info12, T13 info13)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> e)
if (e.Actions is not null)
e.Actions.Invoke(info1, info2, info3, info4, info5, info6, info7, info8, info9, info10, info11, info12, info13);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(string actionName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8, T9 info9, T10 info10, T11 info11, T12 info12, T13 info13, T14 info14)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> e)
if (e.Actions is not null)
e.Actions.Invoke(info1, info2, info3, info4, info5, info6, info7, info8, info9, info10, info11, info12, info13, info14);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(string actionName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8, T9 info9, T10 info10, T11 info11, T12 info12, T13 info13, T14 info14, T15 info15)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> e)
if (e.Actions is not null)
e.Actions.Invoke(info1, info2, info3, info4, info5, info6, info7, info8, info9, info10, info11, info12, info13, info14, info15);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
// ReSharper disable Unity.PerformanceAnalysis
public static void Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(string actionName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8, T9 info9, T10 info10, T11 info11, T12 info12, T13 info13, T14 info14, T15 info15, T16 info16)
{
if (ActionDictionary.ContainsKey(actionName))
if (ActionDictionary[actionName] is ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> e)
if (e.Actions is not null)
e.Actions.Invoke(info1, info2, info3, info4, info5, info6, info7, info8, info9, info10, info11, info12, info13, info14, info15, info16);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + actionName);
else
Debug.LogWarning("[EventManager.Remove]: action type is " + ActionDictionary[actionName].GetType() +
", is not " + typeof(ActionInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>));
else
Debug.Log("[EventManager.Trigger]: There is not " + actionName);
#endif
}
#endregion
#region Trigger Func
// ReSharper disable Unity.PerformanceAnalysis
public static T1 Trigger<T1>(string funcName)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1> e)
if (e.Funcs is not null)
return e.Funcs.Invoke();
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T1);
}
// ReSharper disable Unity.PerformanceAnalysis
public static T2 Trigger<T1, T2>(string funcName, T1 info1)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2> e)
if (e.Funcs is not null)
return e.Funcs.Invoke(info1);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T2);
}
// ReSharper disable Unity.PerformanceAnalysis
public static T3 Trigger<T1, T2, T3>(string funcName, T1 info1, T2 info2)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3> e)
if (e.Funcs is not null)
return e.Funcs.Invoke(info1, info2);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T3);
}
// ReSharper disable Unity.PerformanceAnalysis
public static T4 Trigger<T1, T2, T3, T4>(string funcName, T1 info1, T2 info2, T3 info3)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4> e)
if (e.Funcs is not null)
return e.Funcs.Invoke(info1, info2, info3);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T4);
}
// ReSharper disable Unity.PerformanceAnalysis
public static T5 Trigger<T1, T2, T3, T4, T5>(string funcName, T1 info1, T2 info2, T3 info3, T4 info4)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5> e)
if (e.Funcs is not null)
return e.Funcs.Invoke(info1, info2, info3, info4);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T5);
}
// ReSharper disable Unity.PerformanceAnalysis
public static T6 Trigger<T1, T2, T3, T4, T5, T6>(string funcName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6> e)
if (e.Funcs is not null)
return e.Funcs.Invoke(info1, info2, info3, info4, info5);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T6);
}
// ReSharper disable Unity.PerformanceAnalysis
public static T7 Trigger<T1, T2, T3, T4, T5, T6, T7>(string funcName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7> e)
if (e.Funcs is not null)
return e.Funcs.Invoke(info1, info2, info3, info4, info5, info6);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T7);
}
// ReSharper disable Unity.PerformanceAnalysis
public static T8 Trigger<T1, T2, T3, T4, T5, T6, T7, T8>(string funcName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8> e)
if (e.Funcs is not null)
return e.Funcs.Invoke(info1, info2, info3, info4, info5, info6, info7);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T8);
}
// ReSharper disable Unity.PerformanceAnalysis
public static T9 Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9>(string funcName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9> e)
if (e.Funcs is not null)
return e.Funcs.Invoke(info1, info2, info3, info4, info5, info6, info7, info8);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T9);
}
// ReSharper disable Unity.PerformanceAnalysis
public static T10 Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(string funcName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8, T9 info9)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> e)
if (e.Funcs is not null)
return e.Funcs.Invoke(info1, info2, info3, info4, info5, info6, info7, info8, info9);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T10);
}
// ReSharper disable Unity.PerformanceAnalysis
public static T11 Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(string funcName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8, T9 info9, T10 info10)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> e)
if (e.Funcs is not null)
return e.Funcs.Invoke(info1, info2, info3, info4, info5, info6, info7, info8, info9, info10);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T11);
}
// ReSharper disable Unity.PerformanceAnalysis
public static T12 Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(string funcName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8, T9 info9, T10 info10, T11 info11)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> e)
if (e.Funcs is not null)
return e.Funcs.Invoke(info1, info2, info3, info4, info5, info6, info7, info8, info9, info10, info11);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T12);
}
// ReSharper disable Unity.PerformanceAnalysis
public static T13 Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(string funcName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8, T9 info9, T10 info10, T11 info11, T12 info12)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> e)
if (e.Funcs is not null)
return e.Funcs.Invoke(info1, info2, info3, info4, info5, info6, info7, info8, info9, info10, info11, info12);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T13);
}
// ReSharper disable Unity.PerformanceAnalysis
public static T14 Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(string funcName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8, T9 info9, T10 info10, T11 info11, T12 info12, T13 info13)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> e)
if (e.Funcs is not null)
return e.Funcs.Invoke(info1, info2, info3, info4, info5, info6, info7, info8, info9, info10, info11, info12, info13);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T14);
}
// ReSharper disable Unity.PerformanceAnalysis
public static T15 Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(string funcName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8, T9 info9, T10 info10, T11 info11, T12 info12, T13 info13, T14 info14)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> e)
if (e.Funcs is not null)
return e.Funcs.Invoke(info1, info2, info3, info4, info5, info6, info7, info8, info9, info10, info11, info12, info13, info14);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T15);
}
// ReSharper disable Unity.PerformanceAnalysis
public static T16 Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(string funcName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8, T9 info9, T10 info10, T11 info11, T12 info12, T13 info13, T14 info14, T15 info15)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> e)
if (e.Funcs is not null)
return e.Funcs.Invoke(info1, info2, info3, info4, info5, info6, info7, info8, info9, info10, info11, info12, info13, info14, info15);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T16);
}
// ReSharper disable Unity.PerformanceAnalysis
public static T17 Trigger<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17>(string funcName, T1 info1, T2 info2, T3 info3, T4 info4, T5 info5, T6 info6, T7 info7, T8 info8, T9 info9, T10 info10, T11 info11, T12 info12, T13 info13, T14 info14, T15 info15, T16 info16)
{
if (FuncDictionary.ContainsKey(funcName))
if (FuncDictionary[funcName] is FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17> e)
if (e.Funcs is not null)
return e.Funcs.Invoke(info1, info2, info3, info4, info5, info6, info7, info8, info9, info10, info11, info12, info13, info14, info15, info16);
#if UNITY_EDITOR
else
Debug.Log("[EventManager.Trigger]: There is no delegate in " + funcName);
else
Debug.LogWarning("[EventManager.Remove]: func type is " + FuncDictionary[funcName].GetType() +
", is not " + typeof(FuncInfo<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17>));
else
Debug.Log("[EventManager.Trigger]: There is not " + funcName);
#endif
return default(T17);
}
#endregion
public static void Clear()
{
ActionDictionary.Clear();
FuncDictionary.Clear();
}
// Todo: 添加单独一个事件名的 Clear
}
#endregion