BroadcastMessage() public method

public BroadcastMessage ( string methodName ) : void
methodName string
return void
Example #1
0
 static public int BroadcastMessage(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 4)
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             UnityEngine.SendMessageOptions a3;
             checkEnum(l, 4, out a3);
             self.BroadcastMessage(a1, a2, a3);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(string), typeof(System.Object)))
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             self.BroadcastMessage(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(string), typeof(UnityEngine.SendMessageOptions)))
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             UnityEngine.SendMessageOptions a2;
             checkEnum(l, 3, out a2);
             self.BroadcastMessage(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 2)
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             self.BroadcastMessage(a1);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #2
0
    static int BroadcastMessage(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("UnityEngine.Component.Register");
#endif
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                UnityEngine.Component obj = (UnityEngine.Component)ToLua.CheckObject <UnityEngine.Component>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                obj.BroadcastMessage(arg0);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <UnityEngine.SendMessageOptions>(L, 3))
            {
                UnityEngine.Component obj = (UnityEngine.Component)ToLua.CheckObject <UnityEngine.Component>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
                obj.BroadcastMessage(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <object>(L, 3))
            {
                UnityEngine.Component obj = (UnityEngine.Component)ToLua.CheckObject <UnityEngine.Component>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                obj.BroadcastMessage(arg0, arg1);
                return(0);
            }
            else if (count == 4)
            {
                UnityEngine.Component obj = (UnityEngine.Component)ToLua.CheckObject <UnityEngine.Component>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.CheckObject(L, 4, typeof(UnityEngine.SendMessageOptions));
                obj.BroadcastMessage(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Component.BroadcastMessage"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 static public int BroadcastMessage__String(IntPtr l)
 {
     try {
         UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
         System.String         a1;
         checkType(l, 2, out a1);
         self.BroadcastMessage(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #4
0
    static int BroadcastMessage(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string)))
            {
                UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                obj.BroadcastMessage(arg0);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string), typeof(UnityEngine.SendMessageOptions)))
            {
                UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
                obj.BroadcastMessage(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string), typeof(object)))
            {
                UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                obj.BroadcastMessage(arg0, arg1);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string), typeof(object), typeof(UnityEngine.SendMessageOptions)))
            {
                UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 4);
                obj.BroadcastMessage(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Component.BroadcastMessage"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 public static int BroadcastMessage1_wrap(long L)
 {
     try
     {
         long VM                   = FCLibHelper.fc_get_vm_ptr(L);
         long nThisPtr             = FCLibHelper.fc_get_inport_obj_ptr(L);
         UnityEngine.Component obj = get_obj(nThisPtr);
         string        arg0        = FCLibHelper.fc_get_string_a(L, 0);
         System.Object arg1        = FCGetObj.GetSystemObj(VM, FCLibHelper.fc_get_param_ptr(L, 1));
         obj.BroadcastMessage(arg0, arg1);
     }
     catch (Exception e)
     {
         Debug.LogException(e);
     }
     return(0);
 }
 static int QPYX_BroadcastMessage_YXQP(IntPtr L_YXQP)
 {
     try
     {
         int QPYX_count_YXQP = LuaDLL.lua_gettop(L_YXQP);
         if (QPYX_count_YXQP == 2)
         {
             UnityEngine.Component QPYX_obj_YXQP = (UnityEngine.Component)ToLua.CheckObject <UnityEngine.Component>(L_YXQP, 1);
             string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 2);
             QPYX_obj_YXQP.BroadcastMessage(QPYX_arg0_YXQP);
             return(0);
         }
         else if (QPYX_count_YXQP == 3 && TypeChecker.CheckTypes <UnityEngine.SendMessageOptions>(L_YXQP, 3))
         {
             UnityEngine.Component QPYX_obj_YXQP = (UnityEngine.Component)ToLua.CheckObject <UnityEngine.Component>(L_YXQP, 1);
             string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 2);
             UnityEngine.SendMessageOptions QPYX_arg1_YXQP = (UnityEngine.SendMessageOptions)ToLua.ToObject(L_YXQP, 3);
             QPYX_obj_YXQP.BroadcastMessage(QPYX_arg0_YXQP, QPYX_arg1_YXQP);
             return(0);
         }
         else if (QPYX_count_YXQP == 3 && TypeChecker.CheckTypes <object>(L_YXQP, 3))
         {
             UnityEngine.Component QPYX_obj_YXQP = (UnityEngine.Component)ToLua.CheckObject <UnityEngine.Component>(L_YXQP, 1);
             string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 2);
             object QPYX_arg1_YXQP = ToLua.ToVarObject(L_YXQP, 3);
             QPYX_obj_YXQP.BroadcastMessage(QPYX_arg0_YXQP, QPYX_arg1_YXQP);
             return(0);
         }
         else if (QPYX_count_YXQP == 4)
         {
             UnityEngine.Component QPYX_obj_YXQP = (UnityEngine.Component)ToLua.CheckObject <UnityEngine.Component>(L_YXQP, 1);
             string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 2);
             object QPYX_arg1_YXQP = ToLua.ToVarObject(L_YXQP, 3);
             UnityEngine.SendMessageOptions QPYX_arg2_YXQP = (UnityEngine.SendMessageOptions)ToLua.CheckObject(L_YXQP, 4, typeof(UnityEngine.SendMessageOptions));
             QPYX_obj_YXQP.BroadcastMessage(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP);
             return(0);
         }
         else
         {
             return(LuaDLL.luaL_throw(L_YXQP, "invalid arguments to method: UnityEngine.Component.BroadcastMessage"));
         }
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
 static public int BroadcastMessage__String__Object__SendMessageOptions(IntPtr l)
 {
     try {
         UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
         System.String         a1;
         checkType(l, 2, out a1);
         System.Object a2;
         checkType(l, 3, out a2);
         UnityEngine.SendMessageOptions a3;
         checkEnum(l, 4, out a3);
         self.BroadcastMessage(a1, a2, a3);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #8
0
 static public int BroadcastMessage(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 2)
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             self.BroadcastMessage(a1);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(string), typeof(UnityEngine.SendMessageOptions)))
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             UnityEngine.SendMessageOptions a2;
             a2 = (UnityEngine.SendMessageOptions)LuaDLL.luaL_checkinteger(l, 3);
             self.BroadcastMessage(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(string), typeof(System.Object)))
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             self.BroadcastMessage(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 4)
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             UnityEngine.SendMessageOptions a3;
             a3 = (UnityEngine.SendMessageOptions)LuaDLL.luaL_checkinteger(l, 4);
             self.BroadcastMessage(a1, a2, a3);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function BroadcastMessage to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }