Let’s say I have a table with some nodes like
self.social_media = {
["discord"] = gui.get_node("discord"),
["x"] = gui.get_node("x"),
["telegram"] = gui.get_node("telegram")
}
What’s the preferred way of looping over those nodes and accessing those nodes inside the loop?
Option 1
for key, value in pairs(self.social_media) do
gui.set_scale(key, vmath.vector3(1.25, 1.25, 1))
end
Option 2
for key, value in pairs(self.social_media) do
gui.set_scale(self.social_media[key], vmath.vector3(1.25, 1.25, 1))
end
Is there any difference in performance?