Game Development with Unity for Web Developers Unity Overview & Installing
Transcript from the "Unity Overview & Installing" Lesson
>> We're going to start at the beginning, what is Unity? Right, well Unity is a couple of things, there's a couple of different answers I could give to that. But really the primary answer I would say is that Unity is a game engine. Now that's a little bit of a misnomer because there's a lot of things that you can do with Unity.
[00:00:21] And really, any kind of software that you want to create that needs 2D or 3D interactivity, where you're actually building this world with things inside of it like 3D meshes, you can use Unity for. So, of course, like I said, the primary application of Unity is creating games.
[00:00:42] So games like Subnautica, Cuphead, Fall Guys, Monument Valley, they were all created in Unity. And I think a lot of people are surprised to learn how many of their favorite games are made in Unity. It's absolutely used for AAA games and all of my favorites. So, of course, Unity can be used for creating games, but there's so many additional applications and Unity is finding its way into a lot of really surprising places.
[00:01:17] It can be used for AR and VR product demos. So I've done a little bit of that. So for example, if you're maybe buying furniture online or you're customizing sneakers and you want to use AR to actually see these things, that's a great application of Unity. You can use Unity to preview these things in real time.
[00:01:38] It's being used in film and animation. So, real time production is making its way into a lot of Hollywood productions because it's just faster. It's faster to render things in real time than wait on a render farm to ray trace all of these things and get a result the next day and then have to make notes and so forth.
[00:02:02] It's kind of closing that loop and just making things go way faster. It's used in automotives, so a car dashboard or something like that, all of that stuff is getting digitized now. And Unity is great at presenting UI and it's a great spot for it. And yeah, it's used in manufacturing, architectural visualization where you can potentially preview a building in VR and see the scale of everything before it's built.
[00:02:34] And it's used in a lot of simulation and training applications. So if there's potentially dangerous situation or something like that that you want to train for in a safe environment. Again VR and Unity is a great way to do that. So Unity is used all over the place, it's not just games.
[00:02:57] And there's really a very broad market for this and it's finding its way into all sorts of different verticals. So you may have Unity already installed. I have Unity already installed as well. But we are just going to step through the installation process a little bit just so you can get more familiar with it.
[00:03:19] Because I think you'll find when you're working with Unity, the version that you're using tends to be pretty important. So when you install Unity, it will actually install a piece of software called the Unity Hub and the Unity Hub has several different tabs on the left side. There's Projects, Installs, Learn, and Community.
[00:03:44] I have the Installs tab selected in this screenshot, and that just shows you all of the different versions of Unity that you can have installed at one time. And different versions of Unity have different features, they have different streams of releases. So there's the LTS stream, which is long term support.
[00:04:09] That's best if you are trying to build a project and you just need maximum stability. And that's a great place to start if you're a beginner. There's also the Tech Stream releases where they do release more cutting edge tech and have more regular updates, but they don't promise the same stability.
[00:04:31] So having multiple installs while you're working with different features or working on different projects is very helpful. And when you are working on a project, it's great to kind of lock the version and basically synchronize your watches or synchronize your versions with other collaborators on the project. There's also the Projects window, and that just lists out what projects you have on your system and their version.
[00:04:59] There's the Learn tab where, as the name implies, you can learn more about Unity. Unity the company has a lot of great resources for learning how to use the engine. And then there's the Community tab, which is also great because you can interact with people on forums and get answers.
[00:05:19] And that's really one of the great things about Unity is their community that you can leverage. So we are going to kind of follow these instructions a little bit. This is how you would install Unity if you don't have it installed already. You can go to unity.com, download the Unity Hub.
[00:05:41] There's several different editions, so the Personal edition should be fine. But if you are using this for a business purpose, you should pay attention to the licensing agreements. And then you can follow the setup instructions for the Hub, install the latest Long Term Support version. And then when installing Unity from the Hub, it will give the option to install different modules with it, and you want to make sure that you include WebGL support.
[00:06:11] And if you've already installed Unity and you didn't do that, it's really easy to go to your installs and add WebGL support. So let's pop out of slides here and just go to the Hub really quick and I'll show you some of that. So I have two projects here in my projects window.
[00:06:33] The one we're going to start with, which I'll show you how to get in a little bit. And then the complete version of the project, which is the finished build that I just showed you. I have lots of installs of Unity, this can fill up your hard drive very quickly.
[00:06:50] So be cognizant of kinda how many versions you're installing. The version we're going to use today is 2021.3.0 F1 which at this time is the current LTS version of Unity. And like I said, if you didn't install WebGL support, you can go to the installs tab and where you have that version installed, you can click this gear icon and choose add modules.
[00:07:26] And then it will bring up all of the different modules that you can add, and most of these are for adding build support. So if I were making a game for iOS or tvOS, I could add support for those here. There are several different ways to build for devices or platforms like Linux and Mac.
[00:07:48] And there's also language packs. You can install documentation if you want that locally, and if you actually want to use Visual Studio, it's easy to install it from those modules as well. So I already have WebGL installed on this version. If I were to go to maybe another version of Unity, and choose Add modules, it should show up there.
[00:08:14] Yeah, WebGL build support. So you would check that and choose Install if you didn't have it installed already. Like I said, the Learn tab, lots of great starter projects and cool things to check out there. And then the Community tab has things like the Unity Blog, Answers, Forums, and all sorts of great stuff, so I highly recommend you explore that on your own.
[00:08:42] So I'm gonna jump back into my slides here. And once you have Unity installed, once you have the Hub and the version of Unity that you're going to use, you have to create a new project. So I have a project that I'm going to have you grab from GitHub today.
[00:09:04] And we're going to just open that as our starter project. But if you were creating a new project, you would go to the Create Project or new sorry, New Project button in the upper right of the Hub. This process does change pretty frequently. So this is how it works right now, but these instructions may not necessarily always apply.
[00:09:27] The Hub does get frequent updates. And then after you choose New Project, you would choose one of the templates. So I would say in this case for this WebGL project, you would choose 3D Core. And then you name your project and choose a location. So let's just jump over to the Hub, and I can show you a little bit of what that looks like.
[00:09:54] You could click New project in the upper right and then there's several different project templates. So here's the 3D Core. And this is just an empty 3D project, and it uses Unity's built in renderer. There are several different renderers that you can use that you can install from Unity's Package Manager, which we'll talk about.
[00:10:16] But this is a good one to just get started with, especially if you're a beginner. And then you would name your project and choose a location, you would Create project and then it would open up in Unity. So we're not gonna to do that, I'll hit cancel here.
[00:10:35] We're actually going to use a starter project. So this starter project is available at github.com/nickpettit/unity-for-web-developers, with dashes. And in the Unity Hub's Projects tab, after you pull it, we'll hit Open and then we'll navigate to the Start project directory and open that up in Unity. In this repo we have a start project and this is what we'll actually be opening up in Unity, the start project.
[00:11:19] There's the complete version of the project, which has all of the scripts and also potentially answers to exercises. So no cheating, don't look there. And then there's a Resources folder which just has the slides that you're looking at in this workshop.