New Unity UI 4.6 thoughts - design issues

Hi,
I just downloaded the new unity 4.6 public beta and messed around with it. Although I like the new system and a lot of it’s features, I think there are some flaws in it, and I do realise that this is a beta and it isn’t complete so don’t worry. I am just writing my thoughts feel free to write yours to, I would love to hear your opinion.

Okay so, I have a multiplayer game which relies heavily on GUI to host a game, view others’ games, chat, lobbies etc. and being a multiplayer game there is a lot of code that needs to be run for every button, it isn’t as simple as enabling or disabling an object which is pretty much as far as the new GUI can do at first glance. It is probably possible to convert my project into the new GUI system but from what I can see it is harder to do that than actually use the old GUI itself. This isn’t a rant I am just wondering if I am missing something. Because although the old GUI is hard to use, it can achieve more in code. I am wondering what everyone else’s opinion is on this.

Overall, I do like the GUI system but it seems a bit lacking for my needs.

1 Like

They already said that they knew that they weren’t going to please everyone. And that’s part of the reason why they are open-sourcing much of the new UI.

I haven’t looked at it, but I suggest you are indeed missing something in so far as it’s meant to be used in a completely different way. Ideally, functionality and presentation should be separated anyway, so the concept that the old GUI “can achieve more in code” seems… misguided. All the GUI should do is fire off functionality that’s implemented elsewhere. In that context, along with the new event/messaging system I’ve read about I expect that the new GUI is all over that.

You mention text chat in multiplayer, for instance. From the sounds of it, your GUI code is also where the message sending and receiving happens. Is that the case?

In the new system, you’d have a separate component that sends and receives the text messages, but does not display them itself. When it receives a message, it would fire an event informing anyone who cares about it. The GUI would be listening for that and, when it gets the event, would add the new message to its display. Similarly, when the local player types in a message and hits the send button your GUI would fire an event about it. The other component would be listening for this and, when it gets the event, would package up the text message and send it over the network.

In this manner, the sending/receiving of the text messages and the display/input of them are completely separated from one another. There’s a huge number of advantages to this.

1 Like

There is an events and event triggers video. It should explain how to hook up events. I haven’t tried hooking up events directly from code only (not on the inspector) but I bet its possible in some way. In either case hooking the event from the inspector within the editor looked pretty easy and you can target your own methods within your own components. It sounds like that would cover your issue.

It’s only been out a day!. Give it time.

I would say you are indeed missing something. You can still code just about as easily as with the old UI, using events. It’s just that now you can setup the layout and appearance in the editor - visually, instead of having to program the layout in code.

Before, you had to code, test, code, test, code, test - until you got it to look the way you wanted. Now, you can just set everything up in your scene the way you want it to look.

If you find something please take the time to provide them with feedback in the beta forum

You realise that a UI Button is capable of calling pretty much any function on your scripts? You just wire it up. IIRC you might need to make the function in question public, but other than that it should just work - your ‘lot of code that needs to be run’ can just go into that function and then the button can be wired up to call it.

I dont really see what can’t be done with pressing a button in the new system. Call a function is all that’s needed to make things work.

Check the official video here:

I’ve barely scratched the surface of the new event system but it already makes me very happy, oodles of potential :slight_smile:

I’m rebuilding a scene that has NGUI to use the new UI. So far, it’s an absolute dream to use, easy workflow, and I’m needing far fewer extra scripts.

The crux will come when I try to make my multi-panel multi-channel chat window, which is the single most complex piece of UI in the whole game, by some margin.

1 Like

I’m looking forward to doing the same. Not sure I want to do it with a beta, though…

@angrypenguin

i switched to the beta the minute it came out and i can say after working with it all day that it is very stable and that it appears to have all the latest fixes already rolled in and that i was able to just work with my existing project without any noticable problems or issues. sure i was concerned i would run into problems and it would slow my development down, but after using it for a whole day i can say it has not and in fact it has already helped me by identifying areas that i need to change in my code because they going to be different in the future and i now know because of the warnings and by allowing me to start using the new ui and not waste any more time, money effort into the existing ui. so im very happy and i look towards continuing to use it and look towards the day they finally release it… my only wish is that they do public beta for 5.0 and not just pro owners so that i can also start using some of the new stuff that i saw in the unite 2014 keynote…

Haven’t tried it yet, but judging by the videos, this does look like a solid and a very well thought system.

@derkoi I am sure with a lot of work it is possible to what I want, but it will be very hard due to the restrictions of the system and my purpose for it.

What kind of restrictions do you mean?

@im , it’s less the GUI I’m worried about and more the beta version of the engine as a whole. We’ll see, though… being a hobby project my curiosity might get the better of me…

Darn that’s super annoying. I thought the question was if I thought the new gui is awesome so I pressed yes. I can’t recast my vote :(. My false vote is skewing the data a bit. I’m very enchanted by the new GUI.

Can you explain what’s the problem you have?

Haven’t had a chance to download it yet … is it that different from the latest version of NGUI? Just wondering how much effort will be needed to learn it coming from an NGUI background.