0 votes

How to add more options to OptionButton ?
Need to use GDScript?

asked Jul 26, 2016 in Engine by Chr_ (64 points)

1 Answer

+1 vote

Find it,
get_node("OptionButton".add_item("Item 1")

For more Items with similar name (Item 1,Item 2...Item i+1)

for i in range(0, 9): // From 1 to 9
        get_node("OptionButton").add_item("Item"+ str(i + 1))
answered Jul 26, 2016 by Chr_ (64 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.