Open leandrodreamer opened 4 weeks ago
Update: turns out lua_fields is still required inside metatables, adding it to the custom table with the required properties on it fixes it.
tho it feels unintended since u can still get any value and even run methods, only __newindex fails (or just blocks the execution), also in the docs there is no mention of the lua_fields method in the LuaObjectMetatable table.
my expectation would be that when creating a new LuaObjectMetatable you fully handle the access using index and newindex, and that lua_fields is just for the default metatable.
Describe the bug Hi!, when setting a custom meta table's property with the default object_metatable.permissive set to false the __newindex function completes in the godot side but the lua script freezes on that line
To Reproduce
This example prints:
and nothing else, i get no errors and i can still call other functions inside lua, they will run until another property is set the property gets set properly and even if i remove every functionality of TestMetaTable so index returns 0 and newindex just returns null it still gets stuck in the ' self.name_property = "asdasd" ' line.
Expected behavior I expect my custom meta table to take over the default one (on the 'mytable' table in this example) making object_metatable.permissive irrelevant. Not sure if there is any way to workaround this other than setting permissive to true (which is not the best option for safesty)
Enviromint (please complete the following information):
edit: noticed the latest version is meant for 4.2.2 while i was using 4.3, but tested it on that version too and can confirm the problem persist