The Unity UI Framework That You Probably Aren't Using!
April 25, 2021
• 1,561 views
In this video I introduce a lifesaver for me in terms of Unity3D GUI development... NoesisGUI! More videos to follow on how you can get up and running using NoesisGUI but in the meantime, check out:
https://www.noesisengine.com/docs/Gui.Core.Unity3DTutorial.html
My Social:
LinkedIn: https://www.linkedin.com/in/nickcosentino
Blog: http://www.devleader.ca/
GitHub: https://github.com/ncosentino/
Twitch: https://www.twitch.tv/ncosentino
Twitter: https://twitter.com/nbcosentino
Facebook: https://www...
View Transcript
hey so today i want to talk about uh a ui framework tool in unity that you're probably not using and maybe you want to look at so uh it's called gnosis gui and if you're anything like me when you're trying to make user interfaces in unity it's a bit challenging uh i know some people are probably way better at it than i am but i struggle at you know all things kind of graphical especially user interfaces and i find that trying to use the the object hierarchy and position graphics and get everything just right it's super tedious and by the time i do it if i change any little thing in the hierarchy suddenly everything's a little bit off so i found gnosis gui and what it's what it allows us to do is basically use wpf inside of unity and for me that's super
powerful so i just wanted to kind of quickly cover um you know sort of the power of uh you know the toolbox that you get with it and then in terms of controls and then uh touch on the fact that you can use uh familiar ides to work with and not just kind of stick to unity for all your ui development so uh i think after that i'll probably create a couple more videos diving into some of the you know how to get it set up and how to uh little tips and tricks with that but um i think the really cool thing is that if you're like me and you like working in unity but uh you're not really great with the the ui designer that they have built in and you are familiar with wpf then there's a lot of power that comes
with that so um i just have kind of pulled up in here in unity the some of the user interface for the game that i've been making for a while um i've already started ripping out parts of this user interface to replace it with the wpf version but i have a couple of pieces left um so you know just if i look on the left hand side i have the canvas here i have this hud like heads-up display game object parent and then a couple of uh prefabs that have been dropped on the screen that um i'm using kind of for resource orbs so because it's a role-playing game there's like a health orb and a man orb but then i had to do all the work to try and you know to animate these using the word animate loosely but uh you know modify
these things at runtime so when you're health's dropping it kind of um uses this mask overlaid to to kind of show the health or dropping down same with the mana and then make them into prefabs so they can be reused you know all that kind of stuff so even just to get that working i felt was like pretty tedious um the positioning of things is uh you know uh not not the best i like i i just find that when you make subtle changes things start to look um crappy real fast and uh you spend a lot of time trying to tweak it and just to break it really quickly so with gnosis as i mentioned you can use wpf and what the first thing i wanted to talk about with that is that all the controls that you're used to using in wpf are
available to you so if i wanted to try making um you know a list box or something like that so as an example in the game there's an inventory where the player would have their items and stuff held there's a lot of tutorials and stuff online a lot of great tutorials online for how you might make a list-based inventory or a slot based inventory but you're kind of stuck putting all these things together from scratch in unity and even with all the tutorials i just found that you know i want to make things a particular way and trying to get other people's advice for how to make these uh these inventories wasn't really for me because i need them to to hook up with my backend in a particular way so i'm spending all this time trying to drag and drop these game objects and
use prefabs and it just you know it was a bit of a nightmare so if i could just have something say like a list box that works um without having to tinker too much that would be great or like in wpf we can use styles and things like that um just to quickly edit one resource file and get all these changes propagating through uh that's super powerful um there's lots of little controls like layouts and grids and panels all of that kind of stuff is you know are things that i miss from having a wpf editor and being able to leverage that with c-sharp um i think from making desktop applications for a long time that's something i truly miss when coming to unity and i find that um you know i can end up building a whole bunch of stuff in unity to make
the back end of the the game work but when it comes to the ui it's like i feel like my hands are tied and it makes me actually not want to you know add content to the ui because all of it feels like um you know i'm trying like it's like coding with my eyes closed you know trying to fumble through trying to get things to work um that's my experience with the entity editor so as i mentioned gnosis does let me use all of these controls that i'm used to using so what i'm going to do now is kind of jump over to blend which is kind of going to demonstrate both this first part and the second part i want to touch on which is that we're able to use a familiar ide so instead of trying to position things in unity and
in the the object hierarchy there i can use this visual editor in blend i can see like uh the exact layout how my things are going to look you know in the in the view up top i have my whole xaml editor in the bottom which is great it's what i'm used to using and the nice part about this is that this whole setup inside of blend as i mentioned i'll make another video for how you can configure all this but this whole setup inside of blend is exactly how you're going to see it in unity and the cool thing about that is that i can just press start it's going to load up some assemblies there's a lot of back end stuff in the game that it's loading up and as you can see like this is the the game ui um without unity
this has nothing to do with unity and that's to me really powerful it's able to take the wpf files so um your xaml files and it actually creates assets out of them and then loads those assets up into unity so i can use blend create the ui i want with you know features like hot reloading inside of blend i can change the styles and stuff on the fly and kind of tweak things how i like you know i can even try out like these interactions and stuff that i have coded up i have a break point should have removed that before the demo there's another one cool so you know i can i can try things out there's a bag of garbage here i can go drop that like on the ground in the game that's what that would be i can do all that
kind of stuff in blend and the the way that i see the ui here that's actually going to translate directly into uh unity which i think is powerful so you know just to reiterate i think if you want to check out gnosis gui um something that you're able to do two things i guess is one get access to all of the controls that you're used to using inside of wpf you know for free basically right because you can you can just create these xaml files you're used to making uis with that's part one and then part two is actually using a for me a more familiar ide like blend um edit things directly and then they just show up in in unity so just to quickly show you what that looks like i have these resource folders and you can see that i have a
this is the asset file that it creates this is the xaml file that i'm able to edit so it's probably uh the font's probably pretty small there but this is hud view.xml and uh unity with gnosis basically will allow it to create an asset which is hud view and then from there i'm able to use hud view inside of the game pretty easily like i said i'll follow up with the video on doing that um but yeah i think it's super powerful for me it's definitely unlocked some some user interface abilities in unity because i'm no longer going to have to fumble around trying to make um game objects in in this editor here just because it's not for me um i really struggle with it but wpf and and xaml are something i'm a lot more familiar with so definitely recommend checking it out
and i think that's all thanks
Frequently Asked Questions
What is Gnosis GUI and how does it help with Unity UI development?
Gnosis GUI is a UI framework tool that allows you to use WPF (Windows Presentation Foundation) inside of Unity. It simplifies the process of creating user interfaces by providing familiar controls and a more intuitive design experience, especially for those who struggle with Unity's built-in UI tools.
Can I use familiar IDEs with Gnosis GUI for UI design?
Yes, you can use familiar IDEs like Blend to design your UI with Gnosis GUI. This allows you to visually layout your UI elements and make adjustments in a way that feels more natural, and the changes you make will directly translate into Unity.
Will Gnosis GUI improve my workflow if I'm not good at Unity's UI designer?
Absolutely! If you find Unity's UI designer challenging, Gnosis GUI can significantly improve your workflow. It lets you leverage WPF controls and styles, making it easier to create and manage your UI without the frustration of Unity's object hierarchy.
These FAQs were generated by AI from the video transcript.