Important Notice:

As of September 15, 2016, we no longer publish new courses on this website. We encourage you to use your Digital-Tutors credentials to sign in on Pluralsight where you'll find all new creative courses, skill tests and paths, 1:1 mentoring and more.
Publishing our game
See Details
Joshua Kinney


Joshua Kinney
In this tutorial, we're going to learn how to publish our game to our desired platform. So up to this point, we have taken a look at a lot of the core features that are inside of Unity. We've discussed how to import assets, how to apply materials, how to add components to those objects, how to create prefabs out of those objects. We learned how to manipulate objects and build a level. We've learned how to add lights and how to control those lights, how to bake maps and lighting and how to use light probes-- lots and lots of different features. And then we even got into some scripting to create our game rules. Now, I hope that you take this lesson and you go a little bit further with scripting and really getting into that. But now, we're ready to a point to where we want to go ahead and publish our game. So at this point, what we'll want to do is we want to go to File, Build Settings. Now, inside of our Build Settings, the first thing that you'll see is scenes and build. So whenever you're creating your level or your game, you're going to have multiple scenes or levels that you're going to want to add to your game. So in this case, I want to add this final scene, and then I want to add in the main menu scene, or in my case, I went ahead and changed that shrine script to 10_begin to load that level. So I want to make sure that I add that to my Build Settings. So let's go ahead and come right in here. Let's go to our Scenes folder. And you can drag and drop whatever scene you want to add there. So in this case, I'm going to Add Current, which is going to be scenes 20begin_.unity. And we're going to add in 10_begin. So those have now been added. So the default level is going to be zero. And then the next one is going to be set to one, so you want to make sure that these are in order. Now, you can drag and drop these and reorder them however you see fit. But you need to make sure that they are in order. So once you've added all of those to this list, you need to decide what platform you're going to be sending this to. Now, if you're going to be developing for Android or iOS or something like that, even Flash, there are some things that you want to watch out for. With Android, there are specific limitations. With iOS, there are specific limitations. And Unity has their manual to where you can discuss what those limitations are and building to those. Now, in this case, we're just going to be building a PC standalone. So right now, our target platform is Windows. The architecture, we're going to go ahead and set this to 32-bit, 64. And if we want this to be a development build to where it's kind of an iteration like an alpha or a beta, we can go ahead and check that if we wanted to. Now, before you hit Build, let's go ahead and go to our Player Settings. This is going to bring those up in your inspector. And here, you can input all of your information. So first thing is we would put in our company name- so Digital Tutors-- and then the product name. So I'll just call this the Lantern. And then any icons that you want in here. So the default icon, you could set that as the texture, and then your default cursor. So if you want something a little bit different. And your pre-platform settings. So right now, we're going to be publishing this to this the PC. So we want to make sure that we are under the standalone panel. Now, inside of here, you're going to have things like resolution and presentation. So you want to set your default resolutions and things like that. Do you want to run in the background? Standalone Player Options-- default is full screen, capture single screen and things like that. So you can go through these different options and pick whatever you need for your specific project. We can go to our icon, and you could have an override for your icon here. So whatever sizes you need for that. You have your Splash Image-- so what is going to show up as this is loading. And there are any other settings-- so things like your deferred lighting, the color space that it's going to be using. Do you want it use DirectX 11 or Direct 3D 11, and things like that. So right now, we're just going to leave everything set to default, and then we're going to simply publish this. So we're going to say Build and Run. So doing so, it's going to tell us where we want to save this. So I'm going to go ahead and just save it right here inside of the Unity files. And we're going to call this the Lantern, your game name or whatever you want to call it. And then save. It's going to go through the process of building that and compiling all that. And then once that's finished, it's going to go ahead and bring that up as our .exe file. So I'm going to go ahead and pause the video here and wait for that to build. Now this has been built, this is where our Splash Image would show up. We could adjust our screen resolution. We could set this to windowed. Are graphics quality is going to be good by default. I'm going to go ahead and set this to fantastic. And then any of our input values-- and this is all changed by our Input Manager. And so I think we're pretty good here. And then we'll just simply hit Play. This is going to bring up our window to play our game. And I know it's kind of cutting off a little bit. And then it should go ahead and load up our game here. So our game has been loaded. We could see it in full screen. We can come in here, and we could play. We could start to collect our fuel. And we'll come in, and we'll see that everything is working properly. It's updating our fuel. And let's go ahead and find our shrine object. This probably will be on the other side of the map, and there it is. Now, whenever we hit this, it's going to go ahead and load our new level. And this is just a previous version. So this is loading 10_begin. And now this has been loaded, you'll see that there are no fuel cans around or anything like that. This is just halfway through our level. So I wanted to show you what that looks like, how to build that, how to bring that up in your .exe. So while in windowed, you can always have your cursor. If it's full screen, that cursor may disappear. But you can always close your window. And there you go. So in this course, we have brought you from just zero information about Unity. We've taught you how to import objects, whether that be textures or meshes. We learned how to manipulate those objects inside of Unity to create a base level. We've imported props. We've added materials to those props. We have manipulated those and done a little bit of set dressing. We've added lights. And we learned how to bake those lights and things like that. And then we got into the gameplay of creating scripts and creating the rules for our game. So I hope you've had a lot of fun in this course. I hope we learned a lot about Unity, and I really hoped that it sparked your interest in using the Unity engine. And again, if you want to learn anything else about Unity as far as scripting goes, remember to check out the Introduction to Scripting in Unity if you want to follow along with JavaScript or the introduction to C Sharp in Unity to follow along with the C Sharp language. So I will see you guys next time. Hope you had fun.
In this series of Unity tutorials we are going to learn about the core features in Unity.

We will start out by learning the Unity Interface where we'll talk about the different panels and tools available in the Unity editor. From there we'll learn how to properly export and import assets into Unity. With those assets imported, we'll discuss how to create prefabs that will help us speed up the construction process of our level.

Then we'll learn how to create and apply materials to our level prefabs. Then we'll take our textured prefabs and build a simple game environment. Once the base level has been built, we will talk about adding props and set dressing our level. From there we'll continue full speed by learning how to add lights, particles, and physics objects.

Once we're happy with our level, we'll jump into scripting in Unity. We'll learn how to create a random player spawn, a HUD, item pickups, and so much more. Finally, we'll end the course with how to publish our game to the platform of our choosing.

For an additional learning resource, download your free copy of our Key Game Development Terms Reference Guide and PDF so you can get comfortable with important game dev terminology.