public static int get_name(IntPtr L) { if (LuaAPI.IsObject(L, 1)) { UnityEngine.Object o = LuaAPI.ToObj <UnityEngine.Object>(L, 1); LuaAPI.PushString(L, o.name); } return(1); }
public static int get_tag(IntPtr L) { if (LuaAPI.IsObject(L, 1)) { UnityEngine.GameObject go = LuaAPI.ToObj <GameObject>(L, 1); LuaAPI.PushString(L, go.tag); } return(1); }
public static void PushArray(IntPtr L, string[] array) { LuaAPI.NewTable(L); LuaAPI.PushNumber(L, -1); LuaAPI.RawSetI(L, -2, 0); for (int i = 0; i < array.Length; i++) { LuaAPI.PushString(L, array[i]); LuaAPI.RawSetI(L, -2, i + 1); } }
public static void PushString(IntPtr L, string s) { LuaAPI.PushString(L, s); }