Welcome to the forums @AlPhAmAiN10!
It should be possible to use a group for this. You'll just need to add all the buttons to a group. Something like this should work, I think:
export (array, String) var button_labels
export (array, Image) var button_icons
func _ready():
var nodes_in_group = get_tree().get_nodes_in_group("buttons")
for i in range(0, nodes_in_group.size()):
var group_node = nodes_in_group[i]
if (group_node is Button):
if (i < button_labels.size()):
group_node.text = button_labels[i]
if (i < button_icons.size()):
group_node.icon = button_icons[i]
Then it should just be a matter of assigning the buttons to the groups and assigning the exported variables in the Godot editor, assuming I wrote the code correctly :smile: