How to put a list into UI Text?

Hello, I am trying to create a game with texts and lists, where u travel and buy and sell merchandises. I have created the list of all the merchandises with prices but I am confused as to how to display it in the text UI. Should i use the text UI or is there another easier way to display the product name then the value, like a menu shop of buying and selling?

Depends. If all you want is a list, you could just create a string with line returns and format it the way you want and toss it into a text box. But if you want the player to select from the list, you’ll probably want to create a prefab of a button that you can populate with the item info and display it that way.

Honestly, this is more of a design question on what you want it to do before you determine what it should look like.

Might be of interest

I do something similar in several of my YouTube videos. (Link in signature)

The basic idea is to create a seperate UI element for each item in the List. Then use a vertical layout element to arrange them. Possibly with a content size fitter.

You can do it in a single text element, but it’s much less flexible.