int UnityEngineGameObject_m_SendMessage(RealStatePtr L, int gen_param_count) { ObjectTranslator translator = this; UnityEngine.GameObject gen_to_be_invoked = (UnityEngine.GameObject)translator.FastGetCSObj(L, 1); if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { string _methodName = LuaAPI.lua_tostring(L, 2); gen_to_be_invoked.SendMessage(_methodName); return(0); } if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <UnityEngine.SendMessageOptions>(L, 3)) { string _methodName = LuaAPI.lua_tostring(L, 2); UnityEngine.SendMessageOptions _options; translator.Get(L, 3, out _options); gen_to_be_invoked.SendMessage(_methodName, _options); return(0); } if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <object>(L, 3)) { string _methodName = LuaAPI.lua_tostring(L, 2); object _value = translator.GetObject(L, 3, typeof(object)); gen_to_be_invoked.SendMessage(_methodName, _value); return(0); } if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <object>(L, 3) && translator.Assignable <UnityEngine.SendMessageOptions>(L, 4)) { string _methodName = LuaAPI.lua_tostring(L, 2); object _value = translator.GetObject(L, 3, typeof(object)); UnityEngine.SendMessageOptions _options; translator.Get(L, 4, out _options); gen_to_be_invoked.SendMessage(_methodName, _value, _options); return(0); } return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.GameObject.SendMessage!")); }
public override string Run(ArrayList arguments) { string message; if (arguments.Count == 0) { message = "Unload needs avatar name as argument"; return(message); } string agentName = (string)arguments[0]; // Get Avatar from OCARepository GameObject agentToDestroy = GameObject.Find(agentName); if (agentToDestroy == null) { return("No agent called " + agentName); } agentToDestroy.SendMessage("saveAndExit"); //OCARepository.RemoveOCA(agentToDestroy); message = "Avatar[" + agentName + "] successfully unloaded."; return(message); }
public void CallFunction(AkEventCallbackMsg eventCallbackMsg) { if (((uint)eventCallbackMsg.type & Flags.value) != 0 && GameObject) { GameObject.SendMessage(FunctionName, eventCallbackMsg); } }
/// <summary>Initialization Method of SendMessage.</summary> /// <remarks>If targetGameObject not null calls the method named methodName on every MonoBehaviour in that game object.</remarks> public override void OnStart() { if (!targetGameobject) { targetGameobject = gameObject; } targetGameobject.SendMessage(methodName); }
public static int SendMessage(IntPtr L) { int result = 1; int count = LuaDLL.lua_gettop(L); if (count == 4 && LuaStatic.CheckType(L, typeof(String), 2) && LuaStatic.CheckType(L, typeof(Object), 3) && LuaStatic.CheckType(L, typeof(UnityEngine.SendMessageOptions), 4)) { UnityEngine.GameObject obj = LuaStatic.GetObj(L, 1) as UnityEngine.GameObject; String arg1 = (String)LuaStatic.GetObj(L, 2); Object arg2 = (Object)LuaStatic.GetObj(L, 3); UnityEngine.SendMessageOptions arg3 = (UnityEngine.SendMessageOptions)(double)(LuaStatic.GetObj(L, 4)); obj.SendMessage(arg1, arg2, arg3); return(result); } if (count == 3 && LuaStatic.CheckType(L, typeof(String), 2) && LuaStatic.CheckType(L, typeof(Object), 3)) { UnityEngine.GameObject obj = LuaStatic.GetObj(L, 1) as UnityEngine.GameObject; String arg1 = (String)LuaStatic.GetObj(L, 2); Object arg2 = (Object)LuaStatic.GetObj(L, 3); obj.SendMessage(arg1, arg2); return(result); } if (count == 2 && LuaStatic.CheckType(L, typeof(String), 2)) { UnityEngine.GameObject obj = LuaStatic.GetObj(L, 1) as UnityEngine.GameObject; String arg1 = (String)LuaStatic.GetObj(L, 2); obj.SendMessage(arg1); return(result); } if (count == 3 && LuaStatic.CheckType(L, typeof(String), 2) && LuaStatic.CheckType(L, typeof(UnityEngine.SendMessageOptions), 3)) { UnityEngine.GameObject obj = LuaStatic.GetObj(L, 1) as UnityEngine.GameObject; String arg1 = (String)LuaStatic.GetObj(L, 2); UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)(double)(LuaStatic.GetObj(L, 3)); obj.SendMessage(arg1, arg2); return(result); } LuaStatic.traceback(L, "count not enough"); LuaDLL.lua_error(L); return(result); }
static StackObject *SendMessage_10(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 3); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Object @value = (System.Object) typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.String @methodName = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); UnityEngine.GameObject instance_of_this_method = (UnityEngine.GameObject) typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.SendMessage(@methodName, @value); return(__ret); }
static int _m_SendMessage(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.GameObject gen_to_be_invoked = (UnityEngine.GameObject)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { string _methodName = LuaAPI.lua_tostring(L, 2); gen_to_be_invoked.SendMessage(_methodName); return(0); } if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <UnityEngine.SendMessageOptions>(L, 3)) { string _methodName = LuaAPI.lua_tostring(L, 2); UnityEngine.SendMessageOptions _options; translator.Get(L, 3, out _options); gen_to_be_invoked.SendMessage(_methodName, _options); return(0); } if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <object>(L, 3)) { string _methodName = LuaAPI.lua_tostring(L, 2); object _value = translator.GetObject(L, 3, typeof(object)); gen_to_be_invoked.SendMessage(_methodName, _value); return(0); } if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <object>(L, 3) && translator.Assignable <UnityEngine.SendMessageOptions>(L, 4)) { string _methodName = LuaAPI.lua_tostring(L, 2); object _value = translator.GetObject(L, 3, typeof(object)); UnityEngine.SendMessageOptions _options; translator.Get(L, 4, out _options); gen_to_be_invoked.SendMessage(_methodName, _value, _options); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.GameObject.SendMessage!")); }