- Home /
Make dynamically a list of GuiText's
I need to make a list of GuiText's. When I click a button of the menu, the camera moves to certain position, facing a TV. I need to make dynamically a list of servers in front of the TV to make the illusion that the list is ON the TV. How can I make that?
On figure 1 goes the list of servers.
On figure 2 I need to put a scroll. (I can do that?)
Image quality and saturation was downgraded so that way fits the maximum size of images of Unity Answers
IN ADVANCE I can't use 2D GUI elements because I need a 3D positioned list
I think I will not get a response on this one. I'll keep searching.
Create one where it would appear at the correct properties and position, store it as a prefab, spawn n of these prefabs for maximum visible servers, store them in an array and place with an offset on y for each one. Add two button for scrolling up and down, when scrolling is clicked change scrollOffset and the text in the GUI Text to show server[n + scrollOffset], if n + scrollOffset > number of servers hide the unrequired texts.
This way you'll use a pooling method for the list rather than having to spawn them each time and handle the list a lot easier. If there are multiple texts to appear on the TV (server name, host name, ping, etc.) store the elements in a multidimensional array so allow you to reference the required servers details as n + scrollOffset.
TBH you really don't need to create them all dynamically, just place them in an array and position them in the editor.
Answer by joseques · Jul 19, 2014 at 02:06 AM
I figured out that the best thing I can use is a Text Mesh.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
How to parent a GUI text to current game object 3 Answers
Dynamic Enemy Transform List 1 Answer
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers