Lessons: 8Length: 43 minutes

Next lesson playing in 5 seconds

  • Overview
  • Transcript

2.4 Build the Scene for iOS

Making our scene in Unity is great, but how do I actually get to test this out on a real device to see all the fruits of my labor? In order to get there, in this lesson I will show you how to build your Unity project for iOS.

2.4 Build the Scene for iOS

The next part of the process is being able to take our Unity project in which we've created our scene that's gonna contain our augmented reality. And I wanna to be able to export that to be able to run it on some other device or some other platform. And when I say that, I say it very broadly, as you're gonna see here in a moment. That because Unity is a cross-platform tool, you can actually export the results of your project, whether it's a game or some other sort of application or an AR demo like this is. And run it on several different platforms on iOS or Android or a whole slew of other ones, and that list continues to grow over time. So, in this particular demo for this particular course, I'm gonna show you how to export this to be able to run on an iOS device, such as an iPhone or an iPad. In this particular case, I'm gonna do it on an iPhone, since that's what I have access to. So in order to do this, we take our project as we have here, and we go up to File in Unity and I want to Build & Run. Now, up comes a Build Settings dialog here, and if you go down to the bottom, you'll see Platforms. And these are all of the supported platforms that can handle and run this particular application that we've built. As you see, this list is fairly extensive. We have PC and Mac, iOS, tvOS, Android, as well as other gaming platforms and Samsung TV. Now this is incredibly cool because that means that I can create this application. In this case, I only did it visually, as I promised you that there's really not gonna be any code that you have to worry about that much. Now you can get into code when it comes to Unity, and it does support a couple different languages including C# and JavaScript. But we're gonna save that for another course and some other tutorials. But for this particular case, we didn't have to write any code. But regardless of whether you had to or not, it doesn't make any difference. Because, ultimately, all of the things that we've built within Unity is gonna be exported to a specific platform that you can then use to run natively on whatever platform or device that you want. So in this case, I'm gonna select iOS. And then over to the right, you get some options here. And you're gonna get different options depending on the platform that you select. In this case, I can choose to select Release or Debug as what I want to run in Xcode. In this case, I'm just gonna select Release. Now if you wanted to select Debug, you could do that. And what that would do is, it would create a few other assets along in your project that would allow you to debug your application. And that's kind of outside the realm of this particular course. So I'm gonna select Release. And then these other options, you can just leave as their defaults as unchecked. So in this case, I'm gonna come down to the bottom and I'm simply going to select Build. And then I can select what I want to save it as. So I'm simply gonna call this TutsARDemo. And in this case, I want to specify what platform it is I'm exporting this for, and I'm gonna call this iOS. Now, if I were to be exporting this for Android or for Xbox One, then I would probably put a suffix on the end of the name so that I would know what platform I'm using it for. And then I'm gonna select Save. Now this process could take a little bit of time, so just be patient and I promise you your patience will be rewarded. Now that our project has finished building and exporting, we can now close down the Build Settings. And I can come back into my TutsARDemo folder that's on my desktop. That's where the location was that I chose to build and prepare my project, and you'll see now that I have a TutsARDemo iOS project or folder here. And within here, you'll see all a whole lot of different things. And if you're not very familiar with iOS development then I highly recommend you go back and take a look at some previous examples of what all of that entails. But the nice thing about this is you really don't have to worry about it all that much. All you really need is to have Xcode installed on your machine so that you can then open this up and take a look at it. So in order to open it up, I'm gonna come down here to the Unity iPhone.xcode project file, and I'm simply gonna double-click on it. And that's going to open up Xcode. And it's going to load this project so you can see exactly what's going on. Now, odds are, it's a very good idea to not actually mess around with the things that are going on in here. Because things have been done very specifically for an Xcode project and a lot of the translation between the world of Unity and the world of Xcode. But you can definitely take a poke around in here to see what's in here. And you'll see some very familiar things. You'll see the TutsARDemo.dat file, which we saw also imported within Unity, as well as a number of other folders and libraries within here. But, as I said before, the nice thing is, you really don't have to worry about understanding any of this stuff to be able to get up and running rather quickly. So now that we have all of this set up, let's see an actual demo of our application.

Back to the top