ThePhD / sol2

Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
http://sol2.rtfd.io/
MIT License
4.2k stars 516 forks source link

Setter not working in sol::property with static classes (only release 3.3.0) #1404

Open eduardodoria opened 2 years ago

eduardodoria commented 2 years ago

Using latest release (3.3.0) sol::property setter method is not working:

auto engine = lua.new_usertype<Engine>("Engine", sol::no_constructor);
engine["callTouch"] = sol::property(&Engine::isCallTouch, &Engine::setCallTouch);

On release 3.2.3:

print(Engine.callTouch)  -- working
Engine.callTouch = true  -- working

On release 3.3.0:

print(Engine.callTouch)  -- working
Engine.callTouch = true  -- not working
Smertig commented 2 years ago

Looks like a duplicate of #1268