static public int Invoke(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 UnityEngine.MonoBehaviour self = (UnityEngine.MonoBehaviour)checkSelf(l); System.String a1; checkType(l, 2, out a1); System.Single a2; checkType(l, 3, out a2); self.Invoke(a1, a2); pushValue(l, true); return(1); } 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 }
// // Invoke in x seconds, but only if we're not already invoking // public static void InvokeAtomic(this MonoBehaviour mb, string strName, float fDelay) { UnityEngine.Profiling.Profiler.BeginSample("InvokeAtomic"); if (!mb.IsInvoking(strName)) { mb.Invoke(strName, fDelay); } UnityEngine.Profiling.Profiler.EndSample(); }
static int QPYX_Invoke_YXQP(IntPtr L_YXQP) { try { ToLua.CheckArgsCount(L_YXQP, 3); UnityEngine.MonoBehaviour QPYX_obj_YXQP = (UnityEngine.MonoBehaviour)ToLua.CheckObject <UnityEngine.MonoBehaviour>(L_YXQP, 1); string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 2); float QPYX_arg1_YXQP = (float)LuaDLL.luaL_checknumber(L_YXQP, 3); QPYX_obj_YXQP.Invoke(QPYX_arg0_YXQP, QPYX_arg1_YXQP); return(0); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
static public int Invoke(IntPtr l) { try { UnityEngine.MonoBehaviour self = (UnityEngine.MonoBehaviour)checkSelf(l); System.String a1; checkType(l, 2, out a1); System.Single a2; checkType(l, 3, out a2); self.Invoke(a1, a2); return(0); } catch (Exception e) { return(error(l, e)); } }
static int Invoke(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); UnityEngine.MonoBehaviour obj = (UnityEngine.MonoBehaviour)ToLua.CheckObject <UnityEngine.MonoBehaviour>(L, 1); string arg0 = ToLua.CheckString(L, 2); float arg1 = (float)LuaDLL.luaL_checknumber(L, 3); obj.Invoke(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static int Invoke_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); UnityEngine.MonoBehaviour obj = get_obj(nThisPtr); string arg0 = FCLibHelper.fc_get_string_a(L, 0); float arg1 = FCLibHelper.fc_get_float(L, 1); obj.Invoke(arg0, arg1); } catch (Exception e) { Debug.LogException(e); } return(0); }
void DoInvokeMethod(GameObject go) { if (go == null) return; component = go.GetComponent(behaviour.Value) as MonoBehaviour; if (component == null) { LogWarning("InvokeMethod: " + go.name + " missing behaviour: " + behaviour.Value); return; } if (repeating.Value) component.InvokeRepeating(methodName.Value, delay.Value, repeatDelay.Value); else component.Invoke(methodName.Value, delay.Value); }
static int Invoke(IntPtr L) { #if UNITY_EDITOR ToluaProfiler.AddCallRecord("UnityEngine.MonoBehaviour.Invoke"); #endif try { ToLua.CheckArgsCount(L, 3); UnityEngine.MonoBehaviour obj = (UnityEngine.MonoBehaviour)ToLua.CheckObject <UnityEngine.MonoBehaviour>(L, 1); string arg0 = ToLua.CheckString(L, 2); float arg1 = (float)LuaDLL.luaL_checknumber(L, 3); obj.Invoke(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
// public delegate IEnumerator Continue(Object t = null); public static void Invoke(this MonoBehaviour mono, Task task, float time) { mono.Invoke(task.Method.Name, time); }
void DoInvokeMethod(GameObject go) { if (go == null) { return; } component = go.GetComponent(ReflectionUtils.GetGlobalType(behaviour.Value)) as MonoBehaviour; if (component == null) { LogWarning("InvokeMethod: " + go.name + " missing behaviour: " + behaviour.Value); return; } if (repeating.Value) { component.InvokeRepeating(methodName.Value, delay.Value, repeatDelay.Value); } else { component.Invoke(methodName.Value, delay.Value); } }