You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sol::property and sol::readonly_property providing function instead of getter? #1735
when I try to log input.mouseX on the Lua side, I get:
function: 0x7bfc5bc65fe0
but if I log input.mouseX() then I get the correct integer output (Input::mousePointer.x is an int.) I don't think I'm doing anything wrong here, if I am, please point it out. I'd also like to note that I'm using Lua 5.1.
Maybe bind your "input" as a usertype instead of a table? Then you can use sol::property to bind a getter and a setter function, which will allow you to access it as a property instead of a function call. Example here.
changed the title [-]`sol::property` providing function instead of getter?[/-][+]`sol::property` and `sol::readonly_property` providing function instead of getter?[/+]on Nov 30, 2025
Activity
feat(custom-extensions): init `input` api
C3pa commentedon Nov 16, 2025
Maybe bind your "input" as a usertype instead of a table? Then you can use
sol::propertyto bind a getter and a setter function, which will allow you to access it as a property instead of a function call. Example here.gradylink commentedon Nov 29, 2025
Still getting the issue with this syntax:
[-]`sol::property` providing function instead of getter?[/-][+]`sol::property` and `sol::readonly_property` providing function instead of getter?[/+]