Building Quest 2 VR apps with Unreal Engine 4.27 (Win). (includes Android Studio SDK NDK JDK config)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay this is the windows installation and configuration video for using uh unreal engine 427 with the oculus quest 2 and it takes some configuring um setting up android studio and such to get it going so this is going to be a little bit of a long video but you get a lot out of it i hope so this is the epic game launcher takes a little while to load up you'll see an unreal engine tab on the left yeah there's the unreal engine tab on the left go ahead and click on it and then you'll see the tabs across the top library is strangely where unreal engine is you'll see engine versions my projects etc we're going to be adding a new engine version today 427 that plus sign will let you add the latest greatest engine and you see an install button there there's also some options in the drop down things like set current and remove set current we'll set your default engine for new projects remove will let you uninstall it and we'll go ahead and install this is the default c colon backslash program files path if you have a full drive or in your lethal drive using a d drive or external ssd is fine um it's about 40-ish gigs it's 40 to 50 gigs probably so something to think about this install process can it's gonna take about 40 minutes or so um this please wait we'll run quite some time the installer will run quite some time there's a verify step that can take 20 minutes or more you can see a little progress indicator down in the taskbar where the epic launcher icon is i'm not sure why it takes so long to initialize okay the installer has started notice it's 13.6 gigs for the download so this is going to take a while so i'll pause the video and we can come back once it's down quite a bit further i think this install takes about this step of the install takes about 15 minutes typically and then you'll notice that the installing sort of hangs out for a while right here even though the files have come down i'm not sure why now in this verifying step this verifying step took like literally 30 minutes to run it was kind of insane so i'll edit that out you'll notice there's a downloads option down here you can actually see the progress this is fast forwarded we're 95 in at this point this is useful but it's also kind of annoying that the verify takes so long it'll be nice to be able to skip the verify also i'm voicing over pre-recorded screen record that i did for this so that's how long that's how i know how long all this stuff took i kind of wanted to just narrate over the install process rather than talking through it while i was doing it and the verify step is done again it sort of hangs out here at 100 for quite some time i'm not sure why okay we can now launch 427 and now you can see those other options if you need to remove the install or create a shortcut or something like that you can that's that verify step that took so long i don't recommend clicking on that it's probably good if you have some sort of corruption or something but okay here we go it's gonna fire up you can see here unreal editor four two seven one is loading we don't have a project title or anything yet because we haven't created one but we're about to one thing you won't get in this video is just how long it takes for shaders to compile the vr content you'll see in a little bit there's about four thousand shaders so it's about a 30 minute shader compilation phase but that's edited out of this video so you don't have to deal with it okay that's some old projects i have going on and the what you do here is you select to create a new project we're going to create a new project and you're going to always use games even though you're not making a quote-unquote game for vr you'll click the next button down there now let's lit up green okay and instead of picking blank we're going to pick virtual reality with unreal 427 the virtual reality template is pretty good um there was some issues i think with it back in 426 and 425 but i think it's quite a bit better especially for quest 2. some people do use blank or other templates but virtual reality is it's pretty good for 427 so we'll go with that okay you'll notice there's no starter content you may see with starter content when you first run unreal definitely set it to none uh it's a much smaller install animation package also that before you dive into create project make sure you name your project right here and you know we'll name it something like first vr project or new vr project and that goes into the c drive you can pass out to d or somewhere if you want all right go ahead and create the project and now you see new vr project title here and here and unreal editor 4.271 and here it is voila you'll see new plugins are available you can dismiss that we don't need to update any at this point and some of these steps are going to be just kind of running through some checks to make sure everything's okay first thing i'm going to look at is plugins and go ahead and type ocu in the search box up here and search autocomplete will bring up the oculus plugins and what you want to make sure is oculus open xr is enabled and it is and you don't want the oculus vr plugin down below and it is not um if you have some old versions that you've of the projects and stuff that you've run before you may have to change these which is why i highlight it notice this is a beta plug-in it's beta 1.49 so this may change um pretty quickly so just a heads up there but this beta version of the plug-in so far has been running just fine for me all right so we're good here again there's nothing to click there's no like okay button or anything you just click out the x and now let's go into project settings project settings has a ton of settings this is all different settings panels on the left-hand side so it's kind of a lot to wade through the first one we're going to go into is under project we're going to maps and modes and just make sure that our editor startup map and our game default map are set to this very first map we've created vr template map and it is that's good that just means the game will launch into the first map and also the editor will launch into the first map if you create more maps and then you want to change these you can go into the drop down by where it says vr template map and change it this is our input settings the default touch interface here should be none if it's not set to none you can use the clear option under current asset to make that none not sure why that's not none in the drop down but that's okay scrolling down android platforms has a lot of stuff we're going to take a look at the first thing we want to do is actually configure the project for the android platform notice this big red bar you can make that big red bar green by clicking configure now platform files are now writable if it's your first time installing you're going to see accept sdk license button and you'll need to check it i've already checked it at a different time and so it's remembered that somehow in unreal so i have a grayed out but the very first time you install unreal you'll probably have to check it and do that and there's a bunch of settings in here notice minimum sdk version is set to 23 leave it at that that's fine for now the target sdk version is set to 25 that's okay too leave it at 25 and there's some other stuff down here notice this package game data inside.apk question is checked that's good we want everything to be packaged into one file called a dot apk file if you don't check that other kind of data files will be loaded into these things called obb files which you can see there's some settings down below for those um you want we want everything in one apk file that way if we share it with someone a friend or something or a tester we can just send them one file and they can load it on their quest to and be fine so make that sure that's checked yep okay what else we got okay this is a big one uh support arm b7 notice that's checked that's not what we want and notice arm64 is not checked and we want it to be checked so what's funny is you can't actually uncheck arm v7 what you have to do is you have to check arm 64 and then uncheck arm v7 and really make sure you do that uh the quest 2 is an arm64 device so you want to be running arm64 and not arm b7 i don't remember if quest 1 is rb7 but it doesn't matter for us okay a package for oculus mobile devices see these two array elements click that plus sign and make sure oculus quest 2 shows up first that's fine you can ignore oculus quest and invalid down there what we really care about is that oculus oculus quest 2 is in there as an array element and notice this gray this sorry red box we don't care about this and you can leave it alone this is for google play services we're not using google play services so you can just leave it red it's fine it looks scary but it's not and then let's go to android sdk now typically when you first install it it's going to be totally blank for the first three entries so i'm going to blank those out just to make it feel legit we're going to come back to these and put the right pathing in so that's what it should look like for you and that's fine we'll come back for these three and get these paths in here correctly latest in android 21 is what you want for the fourth and fifth options in the row in that column and i'm just clicking around i think that's it for all of our settings you can close that panel out make sure you hit save current and now we're going to close that out and we're going to install android studio and to install android studio really just open up a web browser oops i relaunched let's get that browser in there yep and go to just search android studio you'll see android and download android studio and sdk tools and you'll see there that green download android studio button 2020.3.1 for windows 64 bit which is great but if you want to find the other options for things like an rmac uh or a regular intel or an old intel mac you can get those here mac 64-bit is the intel version max 64-bit arm is the m1 version so max released this year our arm max actually it's last year and before or intel max go ahead and accept the terms download the xe file for windows it's pretty big it's almost a gig so it takes a little while open xe takes a while to install it's pretty big it's a lot of small files windows is going to say hey are you really sure yes we're really sure okay yep go ahead and hit next we want both of these android studio and android virtual device totally fine go ahead and hit next this is the path to android studio it's worth kind of knowing where this stuff is stored so you can copy it paste it in the text file for safekeeping if you want and now we're installing install completed click next when i start android studio it's gonna ask us if we want dark mode or a light mode and what we want is actually we're not gonna use android studio as a dev environment we're just going to configure our sdk jdk and apk and so what we want to do is we want to go to this sdk manager option right here to configure our pc uh in the easiest way possible on android studio is a great tool for that so notice where the location of it is users my name rob app data local android sdk and that is a path we're going to need to remember later on and so i went ahead and saved that just to remind myself of where it is and notice here android 10 is checked if you just installed it um android studio for the first time android 12 might be checked you definitely want to uncheck 12. you don't want 11. you don't want any other version you just want android 10. that's api level 29. so make sure everything else is unchecked except for 10. now we're going to go into sdk tools tab this is kind of a weird tab see those dashes inside those check boxes that means there's stuff down in those check boxes in those in these entries that have been checked and some things that haven't so what we need to do is we need to unfurl what's underneath these check boxes and the way to do that is by going down to show package details right here checking that and we've now unfurled those items and what we want is only 29.02 uncheck anything else like 31 30 whatever and just 29.0.2 again 29.0.2. everything else can go away and should go away and then we're going to scroll down and now we've unfurled also ndk side by side and the only thing we want checked is 23.0.7599858 again 23.0.7599858 what a number everything else should be unchecked and there's some other stuff down here you can ignore all of it good to know that it's there but we're not going to use it and now you might get a prompt that says like are you sure you want to install that stuff the answer is yes you'll install that might take 10 minutes or so and you'll hit okay and now we're going to go back into epic games launcher back into unreal engine via that library tab we're going to open our project right the new vr project and go to edit go into project settings just a reminder that's in the android sdk option under platforms and what we need to do is click these three little dots these ellipses and we need to path out to it and the place we need to go for that is c now i did the wrong thing i went to program files android and that's not the right place and i realized i made a mistake here oops nope it's not there it's not there either because it's in c colon backslash users backslash rob backslash appdata i think or no c flash app data i'm not sure we'll get there eventually here we go now i'm checking user drop app data local so now we're going to go click the ellipses again go to the c drive i have a razor blade which is why it says razer blade 15 ssd on there go we're in users go to rob go to app data if you don't see app data it's because it's hidden from you and your install of windows i think you can um if you have that problem you can probably just type it into the field up top instead of clicking through three dots like i did i'll go to local and go to android and then go to sdk and that's all you need to do let's look at the folder now we need in the next field we've got our sdk that's it now we need to go get the ndk and the ndk is actually a subfolder of the sdk and what's nice is unreal remember is where we just were so we're gonna update a local android sdk we're gonna click into ndk and into that 23.0.7599858 folder and i think that's yeah that's it and so now we need to get java and this is a little bit of a trick i haven't seen too many people post about this but there is a version of java inside of android studio and i found it to be the most reliable way to build with android studio and so we're going to go get it so go to c program files android android studio jre and i thought maybe it was also bin but i couldn't remember but i fixed it you'll see here i realized my mistake click back mistakenly add bin and then i think i'll get rid of it i have it saved in a different text file open save let me check my old text file yeah android studio jre so no bin so i get rid of this bin bin go away poof and also the last forward slash and then we have latest and android 21 in those fourth and fifth fields and those are totally fine okay let's save current and now we've got everything configured how do we actually get our project onto the quest two excellent question what i'm doing right now is i'm checking to make sure my oculus quest is plugged in and turned on and if you haven't ever done this before connected it to your laptop connects your laptop and the quest is going to give you some ask you some questions inside the quest display so you have to put it on and allow usb connections and allow your computers to access the data on the quest so you can allow that stuff and then your quest to will be ready to communicate with your computer it takes a few minutes to get it all sorted out to put the quest on click on some stuff i think my guardian got freaked out too so i had to fix that there we go quest 2 connected okay so where we're gonna go is this launch item up here but we're not gonna click on launch we're gonna click on this little tiny down arrow on the right there and now for me i see the quest 2 in here and it's because i've done some test configurations before you probably will not and that's ok if you don't see the quest 2 in there it's not a big deal uh after you've done a build it'll show up so go into project launcher project launcher is pretty cool you see now there's a some bunch of devices some stuff in there but quest 2 is now one of those devices and that's great and you'll notice you actually can't click on this row you have to click on launch on the very far right hand side and if you click on launch it's going to start to compile the application it's going to verify it launch it build the game cook it and then deploy it uh onto your device and then launch the game on your device as well so this is a pretty cool like launch checklist that tells you everything that's happening so far we've got two green check boxes that's a good sign notice the output log down here we're going to get another little window that big window that comes up that has a kind of more gross looking output log i'll just reduce it out but it is useful to know what the output log is telling us for instance the build command has started it's telling us various things that it's doing even if you don't understand it it's just kind of good to you'll see these rows with asterisks that's kind of the main header and footer of each phase so because we have build game for android running the build command phase has started showing the log is telling us what's in there building new vr project remember that's what we called it new vr project you'll notice that yellow line yellow lines will appear there okay they're just a warning they're not an error so you can usually ignore them if you get a bunch of bunch of bunch of yellow ones and then a bunch of red ones then you know something's gone really wrong often you'll just get red lines that are hard errors hard stop errors but no yellow lines so yellow ones don't mean too much for people like us i think you'll see a group of yellow lines go by in a little bit it's gonna make the window a little bit bigger so this step will take a few minutes there's that big fast moving log log file we're going to close that out or reduce it out and that data in that giant window is the same stuff that's showing up here in this more nicely formatted window so now if we're in this phase if you look down close to the bottom says performing final apk package operation arm 64. that was at arm 64 versus arm 7 box we checked a common error that will happen is if the android apk or the android ntk or the java jdk paths are messed up that we configured you'll definitely get a fault and it will fail and so i tried to be very meticulous in showing you how that stuff gets how you pass out to go get it if you have a typo or anything it's really kind of ruins your day so and the error messages can be a little bit strange so if you run into an error at this phase definitely check those three paths path to the android sdk the android ndk and the java jdk that's your likely first place of a bug so right now everything is happening on the computer there's no real communication yet happening with the headset but that next step deploying content for android and launching on android is where the headset's going to come into play and our build is successful that's a great sign 59 actionable tasks 59 executed and the deploy command completed and here's the run commands you click down at the bottom of the log file down there you'll see things like running and then you'll see a path and it says adb.exe and then dash s1 and then wmmh blah blah that wmmh is the id of the headset adb is the utility that's used to communicate with the headset there's one of those adb lines and so i think right now if you check the headset you should see the app running um so that demo content that you see in unreal engine will be running in the headset and everything will be cool and then once you've kind of messed around with that you can eventually close the screen out and there we have it you have deployed a test app uh from unreal engine to your quest to with your pc i have other videos for doing it on a in one mac also an intel mac but once you've done it on one platform it's kind of all the same now here's a way to package a project and to package a project that will actually build the apk file locally on your computer and that's how you would then say send that dot apk file to a friend of yours for something and so notice i use the package drop down here we're packaging the project and so what i'm going to do is i'm going to create a new folder i make the folder i typically name mine the same thing every every time i do something and i call that packaged builds and that's just a place where my packager is going to run notice the build directory already exist and that's actually when we do it launch tool that when you use the launch tool that's actually where a copy of the application is stored so you can actually go in there and get it from there if you want but sometimes like say for instance your headset the battery died or something and you want to do a run a build you can package the project without having to have your headset connected it's pretty handy so here we are we're going i'm going in the projects going to package builds i'm just waiting i want to be able to monitor this folder uh for the package run you can also notice i clicked on show output log baron so this is again log file running while the packager is running and now you can see we've got a directory called a android astc there's probably nothing in there quite yet so i'm going to wait for it to finish running before i click into it so again we're in users my name documents unreal projects and my project is called new vr project and then inside there we're in the package builds directory and we're just waiting for it to finish it auto generates that android underscore astc folder for us which is what you're seeing in the in windows explorer and once that has finished running and it has packaging is complete we can go into this android astc directory and you will see three files there the first one you're going to see is that install new vr project the second one is just new vr project arm64.apk that's our actual program our app that first bat file is a batch file if you double click that install it will just actually install the program straight to the headset which is very useful and here i am doing that you can kind of read what it's telling us it's telling us it's going to do an uninstall first and then it's going to copy over the file and it copies over the apk to the headset if you want to uninstall it's that last one uninstall new vr project arm 64. uninstall we'll just go out to your headset and yank that program i'm going to reinstall it you see the word failure is there it's really just telling you that some of the phases a failure doesn't really mean that much say a person deleted the program off headset are ready the uninstaller will still try to remove it but fail because it's already been removed and that's it you have um made an apk file but now we're going to go get sidequest go to sidequestvr.com and it's kind of a weird site it's a promo site it's kind of like an app store right so you see lots of promotional stuff for games and stuff click on git side quest we're going to download for windows 10 you can also see the mac ones are there it's a pretty small app it's mostly a web browser with a few extra features so let me hit save it'll come down pretty quick there it is we'll install sidequest is a cool tool i went ahead and checked everybody that way no matter what user i log in as i'll have access to the application click next that's the path that's fine side quest the top very top bar of sidequest has a lot of the functionality we're going to go ahead and run it and if you look in the top left corner you'll see the connection state of the headset so right now it's amber it says version 0.10.24 connecting that should flip to green once it's connected that downloading is just app stuff downloading and now we're connected that's the ip address of the headset 192.168.86.20 battery stays 100 on the headset and now here is the little down arrow icon install apk file from folder on computer go ahead and click that it's going to open up a file picker we're going to go again to documents unreal projects new vr projects and package builds android astc and we're going to pick that apk file go ahead and hit open and it immediately starts the app install it's communicating with our headset and it is done all tasks completed in that green toolbar down there and you can go to i was having trouble finding it you can go to that um little check box icon there and this is a cool way to see the status of projects what they ran if you want to retry them et cetera this is like utilities i won't go in any of these today but there's some cool stuff in there you can mess around with but that installer apk installer a little down arrow that's our our main thing right there that we want to care about and so now you've just built an app and you've installed it via the launch feature of unreal engine and you've installed it with sidequest you did it you should pat yourself on the back it's a lot of steps it's a pain in the butt but you don't have to be a super duper developer person to make it happen congrats you
Info
Channel: Shimmering Trashpile
Views: 1,016
Rating: undefined out of 5
Keywords: VR, Oculus Quest 2, Android Studio, SDK, NDK, JDK, SideQuest, Unreal Engine 4.27
Id: veKyDnzb7-k
Channel Id: undefined
Length: 39min 3sec (2343 seconds)
Published: Fri Oct 29 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.