- Home /
How to toggle between screens
Hi,
I'm trying to build a very simple strategy interface similar to the one in Civilization IV. I wish to have a row of buttons at the top of the screen, and every time one of them is clicked, the screen displays either a diplomacy screen, a technology screen or a map screen. I would like the buttons to remain displayed all of the time.
In the GUI scripting reference I found the code for creating a toolbar, and it seems to me that this might be the way to go. However, I'm not sure what's the most efficient way of coding the screens that get displayed once each button is clicked.
My question is: should I link each button to display a new SCENE (and keep the toolbar in each scene) or is there a more efficient way of accomplishing this?
Thanks :)
Answer by Kashrlyyk · Aug 27, 2014 at 04:49 PM
New Windows would be enough: http://docs.unity3d.com/ScriptReference/GUI.Window.html
If the button is pressed the corresponding window gets displayed and yes you have to add the toolbar to each window function.
Your answer
Follow this Question
Related Questions
Paper, Rock, Scissor 3 Answers
Does every object have to be static when adding tool bars to Unity? 0 Answers
Unselecting a toolbar 1 Answer
Drawing over the toolbar in the editor. 0 Answers