Defold 1.2.178 has been released

I want to do something like this in extension:

static int get_position_xy(lua_State *L) {
   dmGameObject::HInstance inst = function_to_get_instance_from_url(L, 1);
   Vectormath::Aos::Point3 const p = GetPosition(inst);
   lua_pushnumber(L, p.getX());
   lua_pushnumber(L, p.getY());
   return 2;
}

And in lua:

local x, y = get_position_xy(url)
1 Like