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
It would be nice to be able to expose member variables of a class without needing a getter/setter in the class.
// Assuming we have a vec3 class/struct with public member `x`, like this:structvec3 {
float x{};
float y{};
float z{};
};
// It would be nice to be able to register the property using:dukglue_register_property(ctx, &vec3::x, "x");
An alternative would be to support this by letting the getter/setter method be a free function (or lambda), rather than a class method. That way, even if you couldn't expose the member directly, as shown above, you could create getter/setter without modifying the class, using lambdas:
It would be nice to be able to expose member variables of a class without needing a getter/setter in the class.
An alternative would be to support this by letting the getter/setter method be a free function (or lambda), rather than a class method. That way, even if you couldn't expose the member directly, as shown above, you could create getter/setter without modifying the class, using lambdas:
The text was updated successfully, but these errors were encountered: