public static int set_name(IntPtr L) { if (LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, -1)) { UnityEngine.Object o = LuaAPI.ToObj <UnityEngine.Object>(L, 1); string arg0 = LuaAPI.ToStr(L, -1); o.name = arg0; } return(0); }
public static int set_tag(IntPtr L) { if (LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, -1)) { UnityEngine.GameObject go = LuaAPI.ToObj <GameObject>(L, 1); string arg0 = LuaAPI.ToStr(L, -1); go.tag = arg0; } return(0); }
public static int OpenUrl(IntPtr L) { if (CheckArgsCount(L, 1)) { if (LuaAPI.IsString(L, 1)) { string arg0 = LuaAPI.ToStr(L, 1); UnityEngine.Application.OpenURL(arg0); } } return(0); }
public static int Find(IntPtr L) { if (CheckArgsCount(L, 1)) { if (LuaAPI.IsString(L, 1)) { string arg0 = LuaAPI.ToStr(L, 1); UnityEngine.GameObject o = UnityEngine.GameObject.Find(arg0); LuaAPI.PushObj(L, o); } } return(1); }
public static int Print(IntPtr L) { int nargs = LuaAPI.GetTop(L); string s = "LUA: "; for (int i = 1; i <= nargs; i++) { if (LuaAPI.IsString(L, i)) { s += LuaAPI.ToStr(L, i); if (i != nargs) { s += "\t"; } } } Debug.Log(s); return(0); }