Is it possible to create a button dynamically?

Hello, I’m creating a function that will be used to add names to a list. Multiple names can be added and the names will be displayed on buttons so the user can interact with them. I know how to make it all work but instead creating a certain number of buttons at the start of the level, is it possible to create a button dynamically as needed?
thanks

Yes it’s fully possible! The solution depends on if you’re doing a button in the GUI or the scene.

In the GUI throw it into a for-loop where you check how many input-lines is available. Then offset it each iteration.

In the scene you can instantiate an object that has a OnMouseDown-function.