I am quite new to unity and I have gotten to a stage where I have created a small game with a main window where all of the action happens.
Now I want to add a split screen which has game information on it. I am using the first rome total war game as an example - see below. When you click on a unit, then additional information, buttons etc appear. In the main window, the view or camera would scroll around depending on the appropriate key-press etc.
I did something similar in SFML by using multi-views but I am not sure of the correct approach in Unity and I was looking for some high-level advice or even a tutorial.
In unity is a split-screen for main window and UI possible/feasible?
Or to achieve the below type of setup, should I just plonk down a big panel that covers the bottom portion of the screen and add UI stuff to that?
Again I am new to Unity so apologizes if this is quite a dumb question.
I see this is your first post - welcome to the Forums!
So to jump right in with my opinion (which is by no meas what you would call ‘professional’) I would use a canvas and panel approach. This can be animated, have as much graphics as you want PLUS you don’t have to deal with setting up manual raycasting and the like as you would do with a camera.
[If anyone’s reading this and you disagree PLEASE correct me]
You can easily setup a second camera (or more) for a real ‘split screen’ approach, however I have never used this with a mouse selection system so have NO idea how to handle the raycasts that may or may not be necessary. I have a very strong hunch that it’s possible, and given a morning I could figure it out even in my limited knowledge… but I believe that the canvas+panel approach may be easiest…
Again, if someone’s reading this and throwing their food, drink, keyboard, fuzzy kittens or small children at the monitor in complete shock and awe of my ignorance, and replies disputing me please accept their answer over mine.
@Tset_Tsyung is correct. You don’t have a split screen there; you simply have some UI overlaid on the game view. Go through the UI tutorials (which you can find via the Learn link at the top of this page), and you’ll be well on your way.
Yes as stated above, that looks like a simple UI canvas, right down to the tabs. The one exception could be the lower left corner. While still framed by UI elements, the mini map is probably a second camera view of the world environment.
You can do an actual split-screen by using additional cameras and defining the areas of the screen to be filled by each camera. Each camera has it’s own rendering stack, rendering more than one camera has a performance cost, but many games do utilize multiple cameras. So it can be done and is done but use wisely.