So, ever wanted to learn how to add 1 object to another, of object types that you create? Well here is how!
You can find the video here.
I hope this comes in handy for all y’all out there.
So I am running into a weird issue. I am trying to get a list of classes that aren’t monobehaviours to remain after pressing play, but they won’t, and it makes no sense why not.
I have tried everything I can think of, but to no avail…
The GUI class in Unity really needs to be removed. Why? Because it gives people a false sense of control. It also creates terrible, terrible practices among Unity Developers. The GUI class allows you to define exact coordinates for your GUI. What you don’t realize, is that this breaks 2 things:
Your GUI should always be as purely semantic as possible. It is the HTML fight but in Unity. In HTML, using Tables is a deprecated way of styling your websites. It is far superior to use CSS. An HTML website should be purely semantic, and have no styling without CSS. It is the same with GUI’s in Unity. GUISkin’s allow you to skin your GUI’s similarly like CSS for HTML. It can allow you to build far superior GUI’s, as you can easily change out the style whenever needed.
GUISkins don’t work properly if you manually place objects. They get really confused when you try and add margins and spacing, change font sizes, etc.
With GUILayout, your GUI is almost entirely semantic in meaning besides the little bit of styling that is required in GUILayout. It also makes GUISkins work properly, and scale and texture things appropriately. If your designer came in, and wanted to completely redesign your interface, with GUILayout, he doesn’t have to touch the code almost at all. The only code he’d have to touch is if he wanted to change the order of things (Button 1 on the right rather than the left, things like this). GUILayout allows your designer to bring in tons of artwork, and easily redo spacing, change out fonts, tweak alignments, etc. without having to go into code at all. This is what is desired, and if you are smart about making your GUI’s, you’d go the GUILayout approach.
Awkwardly shaped GUI’s are entirely possible using GUILayout.Area(Rect position) and GUI.Window() and GUILayout.FlexibleSpace() and GUILayout.Space(float amt). There will be your 4 best friends when working in weirdly shaped GUI’s. For instance, let’s say you wanted to make a U shaped GUI, you would then make an GUILayout.Area in the area that you want it, and put whatever you need on the left side, flexible space, and then do the right side, then in your second GUILayout.BeginHorizontal() you will do your next row or your bottom row, where it is the bottom of the U.
As you can see, GUILayout is very powerful, and is the superior choice. That is why they added it after all…
I just finished recording a whole strew of C# tutorials on some advanced topics, and will be releasing these as soon as possible. Currently they are being rendered, and will take a while to render them all. Once they are all rendered, I will have to upload them all, then make them available all at the same time.
They aren’t very popular, and as much as I want to make my channel more diverse, the people that come to my channel come to find Unity. Beyond this though, I cannot work in Unreal anymore, as my nFringe install is messed up, so I am just going to stop the series, and focus on the Unity tutorials from now on.
Here is the list of episodes:
Finally got my advanced AI series finished, and will be getting them out to all of y’all shortly! Time to start preparation for another series, and this one is going to be great!
I dislike uploading episode by episode though, because I leave all y’all hanging for a week. I think with this next series, I am going to record it all, then upload each episode individually.
I have also decided that I am going to slowly take down my older episodes (really just set them to unlisted) so that my newer episodes are what are seen. If you are following this, and you still want to keep going through my older videos, I recommend copying down the links for my older episodes.
I finished making my test winforms app, and have just about everything learned that I need. Next step: Make it in Unity!
More information to come when I am more awake, but expect a tutorial about how to implement facebook into your app without having to buy any tools online for it. It will be great!