public static void UnPack(ObjectTranslator translator, RealStatePtr L, int idx, out UnityEngine.Quaternion val) { val = new UnityEngine.Quaternion(); int top = LuaAPI.lua_gettop(L); if (XUtils.LoadField(L, idx, "x")) { translator.Get(L, top + 1, out val.x); } LuaAPI.lua_pop(L, 1); if (XUtils.LoadField(L, idx, "y")) { translator.Get(L, top + 1, out val.y); } LuaAPI.lua_pop(L, 1); if (XUtils.LoadField(L, idx, "z")) { translator.Get(L, top + 1, out val.z); } LuaAPI.lua_pop(L, 1); if (XUtils.LoadField(L, idx, "w")) { translator.Get(L, top + 1, out val.w); } LuaAPI.lua_pop(L, 1); }
public static void UnPack(ObjectTranslator translator, RealStatePtr L, int idx, out UnityEngine.Color val) { val = new UnityEngine.Color(); int top = LuaAPI.lua_gettop(L); if (XUtils.LoadField(L, idx, "r")) { translator.Get(L, top + 1, out val.r); } LuaAPI.lua_pop(L, 1); if (XUtils.LoadField(L, idx, "g")) { translator.Get(L, top + 1, out val.g); } LuaAPI.lua_pop(L, 1); if (XUtils.LoadField(L, idx, "b")) { translator.Get(L, top + 1, out val.b); } LuaAPI.lua_pop(L, 1); if (XUtils.LoadField(L, idx, "a")) { translator.Get(L, top + 1, out val.a); } LuaAPI.lua_pop(L, 1); }
public static void UnPack(ObjectTranslator translator, RealStatePtr L, int idx, out UnityEngine.Ray2D val) { val = new UnityEngine.Ray2D(); int top = LuaAPI.lua_gettop(L); if (XUtils.LoadField(L, idx, "origin")) { var origin = val.origin; translator.Get(L, top + 1, out origin); val.origin = origin; } LuaAPI.lua_pop(L, 1); if (XUtils.LoadField(L, idx, "direction")) { var direction = val.direction; translator.Get(L, top + 1, out direction); val.direction = direction; } LuaAPI.lua_pop(L, 1); }
public static void UnPack(ObjectTranslator translator, RealStatePtr L, int idx, out UnityEngine.Bounds val) { val = new UnityEngine.Bounds(); int top = LuaAPI.lua_gettop(L); if (XUtils.LoadField(L, idx, "center")) { var center = val.center; translator.Get(L, top + 1, out center); val.center = center; } LuaAPI.lua_pop(L, 1); if (XUtils.LoadField(L, idx, "extents")) { var extents = val.extents; translator.Get(L, top + 1, out extents); val.extents = extents; } LuaAPI.lua_pop(L, 1); }