I’m creating a plugin from gui to Lua and, for that, I need to get the GUI properties using the method below but it gives an error because it didn’t recognize the property. the only method I found to fix it was to separate each property from each class, but that would make the code very large and difficult to understand; is there a more compact way to find properties?
local function properties(obj)
for _, properties in pairs(dataProperties.Properties) do
if obj[properties] then
if dataProperties.Extras[properties] then
extra[1] = dataProperties.Extras[properties]
extra[2] = ")"
else
extra = {"", ""}
end
property = obj.Name..[[.]]..tostring(properties)..[[ = ]]..extra[1]..tostring(obj[properties])..extra[2].."\n"
final_source = final_source..tostring(property)
end
end
end