public static Ray ToRay(IntPtr L, int stackPos)
{
int num = LuaDLL.lua_gettop(L);
LuaStatic.GetUnpackRayRef(L);
LuaDLL.lua_pushvalue(L, stackPos);
if (LuaDLL.lua_pcall(L, 1, 2, 0) == 0)
{
Vector3 vector = ToLua.ToVector3(L, num + 1);
Vector3 vector2 = ToLua.ToVector3(L, num + 2);
return(new Ray(vector, vector2));
}
string msg = LuaDLL.lua_tostring(L, -1);
throw new LuaException(msg, null, 1);
}