Seriously, this is frustrating and very annoying me off since few weeks.
It’s hard to find tutorials for Unity 5 that talks about the UI system and how implement it well in a game. All I can find is generic 2D / Mobile game tutorial that have nearly nothing in it. It’s been months Unity 5 is out and it’s nearly impossible to find concrete and complete resources about it.
I tried to reject the fact Unity was bad but it seems to be right, or at least a little.
My project is not complex, it’s just yet-another-3D-shooter online game, I already master the network library with ease (got it in trial 1 month ago, 2 months left, I still have not been able to use it the way I want in Unity !), but Unity makes everything harder for everything I want to do.
I’m a C++ coder, that might explains why I can’t get in the Unity-hell of a mess-scripting system as I’m familiar with the OOP.
So, it’s pretty simple:
Since it’s an online game, I obviously need a Login screen, right ? Right, and like every online game out there, you have a character or anything to control, so when you login, you have to create or maybe even select it for some games, right ? Ok we got a start here. Now, how to code it ?
With all the tutorials I saw until now, I would have made the most unoptimized game ever just with this simple example, because everything is played with hide/show, just imagine on a very detailed UI !
So with my example it could be like this:
[×] Scene: Login - Everything that happens before entering the game world
[-] Login
[-] Channel Selection - for a MMO game for example
[-] Select Character
[-] Create Character - only if we need to
[×] Scene: Loading - Entering the world, unfortunatly games still have loading times …
[-] Loading
[×] Scene: Game - The game world itself
[-] Explore - this is where you actually move freely in the world
So the reason I did it like that is that you won’t change scene everytime you have something different to do, you could have for example some data to keep while in the Login scene (but not once in the game), and it would add a degree of complexity of having a scene for each screen, as you would have to manage the lifetime of your data by yourself.
I find it pretty clear like that, but the reality is way more complex than that, because now, how will Unity handle it ?
While in the Login scene (let’s say it’s a full 2D scene), it’s pretty simple, it’s just UI switch, then once we need to enter in the game world, we send the user to the Loading screen to process data (like receiving your inventory) before actually be able to move freely in the world along with other players. I don’t think I can be more precise than that
But then comes another problem, the in-game HUD, how to display a 2D UI in a 3D world without the scene in Unity Editor being a complete mess.
What about windows or message boxes, those can’t be put in a specific scene, as they could be used in anywhere in the game.
This is where, I think, there is a problem with the Unity UI, where is the correct place of the UI ? As I saw with most of the other games, they usually separate the UI into their own files, in Unity it would give an additive scene per UI. Take my exemple back, and you will see it will be complicated to integrate it, and I’m not even talking about the cost in performance.
Anyone experienced this frustration already or am I the first ? And it would be interesting on having a debate about the Unity UI implementation in it’s current state (and it’s missing controls like List …)