How to Learn VR in 2024 with Unity3D and Meta SDK on Meta Quest Step-By Step [Part 1]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello there welcome to my Channel game 5D in which I'm going to share exciting contents related to building immersive experiences and games my name is bisit and in this new tutorial series we'll dive into the Incredible World of year development for the Met quest to using Unity 3D whether you a seon developer or the starting out this series is designed to guide you through the process step by step before we kick things off make sure you hit that subscribe button and ring the notification Bell so you'll never miss an update without further Ado let's get started all right before you begin make sure to download darkless app from the stores for your phone and install it once you once you do you need to sign into the meta development account so that the app could recognize your profile once you do you land on the feed page which will show you all the latest news and more apps to [Music] you then you have your store where you can see available apps like top selling most popular ones then you would have your gallery where you could see all your synced media from your quest device on your phone and lastly you have menu where you can see your profile and some other options for now we will click on the meta Quest button since I have my meta already paired in I would just open up a new pairing connection you have to enable Bluetooth and in order to join you have to allow new connection then you will see a list of devices that you can connect to like all of them from our meta I have a meta to so I'll select that and then you have to follow up with this setup like if you have already set up an avatar you can customize them it's not needed though you can skip it also it will automatically connect if you're lucky otherwise you have to manually enter your pairing code just to connect to that it will take a second and it's really seamless I'm glad what meta has done with the sockless app once done uh you're good to go just close the screen and meta will automatically sync the profile everything from your phone onto the headset once the device is synced you could see your battery status and also a way to cast your device screen onto it but for now we'll go into headset settings click on the developer mode option and we'll enable the debug mode to allow us to install our apps on the headset you could also see advanced settings in case if you need to reset your device or factory reset or update few of the settings you can do that from the app here itself and that's it you have enabled developer options on a quest all right let's head over to metad developer [Music] documentation so the link to this documentation will be in the description below go to this link click on the overview section and there you would see the development process The Meta recommend us to [Music] follow first we have to set up our development environment which we're going to do next then we need to make a simple build to verify that the development does indeed work and we don't get any errors while building the APK in the following series we're going to dive deep into meta sdks and the feature sets that meta provides below that you could see the ideal development uh cycle to create a meta apps and distribute it onto the Quest lab app lab okay let's head over to the uh requirement section to see what all requirements we need to have first of all we need to have a meta device I have a meta Quest 2 then you need you are going to need at least a 2 GHz processor system and 2 gab of ram but make sure you have at least 8 GB of RAM because you're going going to run Unity on it and as part of os you can have an Windows 10 or an Mac OS running Mac OS Sierra or anything higher than that and finally we're going to need Unity so I do have uh Unity Hub downloaded if you don't have Unity Hub yet I'll make sure to leave it uh link to the in the description below for you to download open up the unity Hub and from inside Unity Hub we are going to install the editor that we need so before you open uh Unity Hub make sure you login or have an Unity account so let's head over the documentation and see what version uh meta recommends so they recommend a minimum of 2021 LTS version so anything higher than that would work and in order in order to build the app we need to have the Android build support module the Android SDK ndk and open jdk so let's go back to Unity Hub so I have 20223 LTS installed Which is higher than 2021 you are uh allowed to uh like install any of the LTS version above than that but I would recommend get the latest LTS version to have the maximum support and from installs head over to install editor once you click on that you could see all the available official releases for LTS version you can get pre- relases as [Music] well head over to the ad section and you could see all the modules that you can download if you don't select the modules right now it's okay you can install it afterwards [Music] okay once installed let's open up a new project so on the new project you could see few of the settings on the top you could see a drop down and it will show all the editor that you can create a new project end then you will have few of the templates installed and you have something to download for uh for this tutorial I would recommend uh downloading the 3D urp code template and not the 3D code template because urp is going to give us a scriptable rendering pipeline which we can modify to have a better looking rendering than the default render pipeline add a project name as per your wish and [Music] then if you have a Unity cloud account you can use that to sync your code into Unity version system I don't need one uh for this tutorial so I'll just uncheck it and then hit create project so for the very first time if you're opening Unity this process may take longer based on how powerful your system is and because it's going to create all those files and cach it I'll see you once the project opens up on my [Music] system okay once you have Unity opened you should see your urpc preloaded it should be called sample scene with a main camera Direction light and a global volume component in loaded already then you have in your project you should see all the pre-loaded packages for the 3D urp scene I recommend removing some of them because they can add a lot of bulk to your project and can increase project size to do that head over to package manager and in Project packages you should see all the pre-build packages installed you can select the ones uh to remove it but the ones that have an attachment icon near to them you cannot remove them but the ones that don't have you can hit remove and that should be it okay before uh we do anything let me show you the Legacy package we are using with version 57 of oculus sdks and before that it's called Oculus integration SDK and it's still available on Oculus uh page but you should see it's marked as Legacy and and the version that's it's supposed to have the latest one is 57.0 you should see a note here mentioning that the Stik has been deprecated and is replaced by the MX car packages in unity package manager from version 59 and above although one more thing I wanted to show you is kind of misunderstood by most of the tutorials I have seen on YouTube that this package itself has introduced building blocks and the building blocks is not or was not introduced in the new packages only it was already introduced in this Ulus integration STK although do note that it was experimental so don't use them uh if you have a integration SDK installed and you are building an production build all right let's head over to Unity ass store make sure you are logged in using your un profile and search for meta XR utilities which has been renamed to meta XR core so search for meta XR you should see all the smaller components that meta has uh given to us to download and use so the first one that you would see is the meta XR core SDK and followed by all the other Sub sub modules or sub packages that you can download as for your need I would have to say m has done a really good job understanding the complexity the Oculus Oculus integration package previously had so it was kind of a Miss uh it was very hard to keep track of what components are in which folder but yeah kodos to meta for separating them out so you could find each of the individual features SDK here as well but one thing I wanted to show you is this meta XR all in one SDK in case you need all the SDK together for the app You're Building you can can get this package instead instead of downloading them one by one and this package itself is going to Auto download all the separate modules once you import it into [Music] Unity let's head back and let's talk about the metacore SDK so the core SDK is the base SDK that each of the module is going to need so it has all the core components and the features to serve as the base for each of the for each of your VR app and for this particular tutorial I would recommend you download only the core package so that your projects stay lean and not bulky with this additional package which we are going to visit in the next uh episodes or in the next series one by one apart from that you also going to need the XR interaction STK but not in this video I'm going to show it in the subsequent videos and just to show you uh the difference between the package uh features what this [Music] contains so it was uh the metacore xtk as per the documentation is similar to what we had in the VR folder in the Oculus integration package so you would have install button there I have open Unity because I've already installed it once you do that let's head over to Unity let's go into the package [Music] manager in the package manager you need to make sure you select my assets from the project drop down and based on how many assets you have it may take some time to load search for meta XR or meta itself and that should filter out all the metx in case you might have added you can see the meta core SDK doesn't have any dependencies to it but the meta Allin War XR has all these dependencies that will get [Music] downloaded so let's import metacore [Music] xtk and once you hit import it may take some time to download all the components then serialize them and import them into a project so this may take some time as well okay once installed you should see uh an analytics approval you may allow it I will deny and then it would ask ask you to restart the editor because it's going to update the OVR plugin and OVR plugin is the plugin that Unity uses to talk to the VR on time in the VR headset all right so by this time the unity should reimport and restart so this restart would be much more faster than the initial project opening because all of the files have been already cast the only files that are needed to be cast are the new imported ones all right so once you have installed and restarted Unity verify that the Met XR core SDK is installed by going into in Project assets and you should see the meta XR code is stick installed if it's in case it doesn't appear for you make sure you reimport again and restart Unity so once installed let's see our project view in the project folder you should see under packages there is a meta XR code SDK as well as under assets you should see an Oculus folder with an Oculus project config into it once click on that you will see that it will ask you to change to Android platform let's fix that by going into build settings click on Android and click switch platform if you don't see the Android platform here make sure you have added the Android module along with the Android SDK ndk and open jdk setup once you do that open unity and you should see the Android uh platform appearing for you to switch ideally depending on the project size the switch platform may take some time but as we have a very new project it shouldn't take uh that that longer and once the dialogue or the progress dialogue finished still wait for a couple of seconds as there could be some possible background task going on so you can see those background task on the right bottom and it's better to wait for it to [Music] finish okay so once compiled you should see the bu config showing up all the options because the script table scripting a scriptable asset has now compiled based on Android and it has some settings that you can toggle to based configure your Oculus builds like for what SDK you're going to build then you have this individual group of tabs that you can visit but most most of the times you would be uh changing the general settings all right so as I said earlier uh so the meta XR core SDK okay still has the latest uh building blocks and Oculus uh Oculus tool button appearing like introduced so you can click on the Oculus button to see three buttons like setup tool platform uh building blocks and the OC settings you could still access those menu from the top menu as well so the next thing we're going to do is to apply the recomended settings for The Meta sdate to work so click on the project setup tool either from the Oculus button or from the top menu once you have it opened it should open up the Oculus recommended settings to apply so these settings are needed to be applied before you can build the APK and so once you have it opened you should see all these recommended settings as just uh the configuration individual configuration we used to do in the player settings but now they have combined it to a single window and making it much much more easier to configure the SDK without having any errors so hit fix all and that should fix all the issues first it may take multiple fix uh buttons because some of the configurations needs to reload uh the editor so it might not fix at the first goal [Music] so as you could see it did not fixed for me so hit fix all again that should do it and once that's done you could also verify that those have been fixed by going into console and you should see console logs appearing from from Oculus settings then if you have recommended settings do apply them as well and it also may take some time because it needs to change the player settings and reload the editor [Music] configurations all right so once installed uh head over to XR plugin management and make sure that the Oculus plug-in has been installed and the Oculus is sted on you could also visit the Ulus Sub menu to uh see the type of settings that it already had so this all all has been done by the recommended settings which again was lot more easier to do all right once you have visited all the settings uh close this window and [Music] head over to the meta XR core STK but before showing that let me show you what all components The Meta XR core SDK contain [Music] contains so if you go to the documentation and click on key terms you should see the meta XR core SDK and as for the definition it contains the settings for controllers the boundary system spatial splash screen mixed reality apis and pass through scene along with special anchors if you need some more information regarding what individual wants does I'll make sure to leave a link in the description for you to look at all right let's go back to Unity open up my txar core SDK head over to prefabs and you should see a lot of prefabs appearing here and the one that we need to start is the OVR camera rig so click on it and so there are two ways you can access this so uh once you open it you should see all the scripts on it we'll go into detail one by one in subsequent videos but if you don't if you don't find it just search for over camera rig it may not appear at first because you have to select the correct filter and set it to all in order to appear also there would be two files one is from editor folder and one is from the prefab folder make sure you drag the prefab folder onto your hierarchy and if you want to see where the positioning or where the placement of the prefab is in the project make sure you clear the select the OVR camera rig prefab select the clear field search field and then you should see where it's add drag it to the hierarchy delete it from delete the main camera from here and the we camera manager is the main component for setting up your uh XR rig so that you can move your head around and the camera would follow it also contains a few of the other components that we're going to look at in a in a few in the next video but the main one is on the root component it's called the main script that's on the root component it's called overr manager this is the main [Music] interface also as I said the manager uh contains the reference to the same Oculus project config and just to make sure that this is the same config if I if I go back to the ocus SP config directly and hit let's say the check box save it and go back to the VR camera manager and indeed it it show the same check mark so if you ever have a lot of items and you don't find the V camera rig so there's a quick way to do it by going through the assets and clicking on it so in the OVR camera manager you should see all the same options okay before we move I wanted to show you uh one of the main settings that you need to configure in the OVR manager before you build to app out which is called the tracking type so the tracking origin type should be set mostly to the floor uh level you have different ones like ey level and stage level so eye level is the one where uh once you start the application it will automatically sync the level to be at your ey level so doesn't matter if you move up and down it would always be at your eye level the floow level takes uh your calibration of your Oculus when Once uh when you set up your Flo type and uses that to set the height of your app but I have seen many people confused by after even selecting the flow type they normally set the relative trans translation in the OVR manager to one or something so that it will match the height but that's completely wrong you should make it to zero because the Oculus app is smart enough to take up your calibrated height and use that as the floow label and other than that there are a lot of settings uh and we'll go one by one in depth in in subsequent videos but for now once you have uh everything set up and it looks good make sure uh you hit play just to confirm that there are no console errors or any settings that we might have forgot to add [Music] all right it did played fine for me I don't see any console errors so stop the play there are another couple of settings that you need to do before you can build your project so click on file build settings and make sure you have your scene added into the scene window and the texture compression set to etc2 or ASC both of them works for Android compression head over to player settings and in here we need to set the default company name so keep give it your name or if you have a company make that your company name I'll just make it game 5D as my channel name and in the Android settings head over to all other settings and make sure in the graphic apis you remove vcon because vcon is not supported in Android 8 you you only have open glees you can also select autographics API but I prefer to have it explicitly defined then you have to set up your package name and this is a string that normally follows your website if you have a website uh backwards so just make it like com do your company name followed by your app name and I normally add a test to the uh to the CL so that the same package name doesn't get used uh like if I have to again release a package or APK with the same package name I can just remove the test and I'll will have a unique package by default all right and everything else if you scroll down uh is already done by those recommended settings so again fewer steps now um with the newer meta sdks also this public settings is what you're going to use to sign your apks so you have to generate a key store and those key Store password must be like kep private for you to create the file also it also generated an uh the Manifest file and the Manifest file is needed for Oculus and I will show you where the Manifest file is generated so if you go back to assets click on plugins there would be an Android folder and inside that you should see an Android XML so this is autogenerated and the main uh lines are these meta files that has been added by Oculus and you could you could could go into the file yourself if you want to learn more what are the different permissions or uh information that has been added into the meta uh into the Android manifest file for meta Quest 2 all right once everything looks great let's let's add an object to the scene so that we would have something to look look at once we build our APK place a cube and move it in the Z axis in front the camera and you would see that the camera is right now at the same level as as the cube but once we build it you should see that once you open the app it will take that particular Point as a floor and uh it will automatically have it set up your height so that it doesn't uh appear in the same level as your eye level because we have the floor tracking type setup all right so select your device if you have if you don't have then just click build and gave a location for the APK file to generate on so I I normally create a build folder inside my uh Unity project and name it whatever you want the app to be and click on Save and this is crucial as uh if I show you the documentation again based on the development workflow so if you if you look at the number two or number three it says that you need to build first and this is crucial to make sure that everything builds just fine and if it does throw some errors that means we need to reconfigure few of the settings we might have missed but if it filds fine then uh then that means the Oculus development uh for Unity is complete like all the configuration file is correctly set up and there are no errors and you should be good to go for building the apks so I'll wait for some time to see if we have any errors or not and I will see you once uh once this progress bar is completed awesome so I got the build out and it built successfully for me so that means no errors there and we completed all the steps correctly so if uh we got our APK and before installing let me show you another cool app that meta has released recently and and it's called The Meta Quest developer Hub and this app is really cool it's because it has it contains lot of unique uh features that we had to manually do uh previously and you can see like you can connect your uh headset through Wi-Fi connection or through the um cable it also allows you to disable proximity C sensors and boundaries the guardian uh while you're testing it so so that the testing will be uh non-interrupted because most of the times the boundary does appear near to your table or wherever your workstation is so it's that's really really Nifty and really good feature to have uh we can also wirelessly debug our device and see the locks we can also capture screenshots and videos uh this is the best one to deploy app directly onto the headset from your computer and we can also upload our app from the developer dashboard to the store so just go through this documentation link and if you have a Windows machine there is another cool app that you could use to streamline your development Journey really uh fast it's which is called the quest link and this is the documentation page for it and uh it mentions all the steps to how to set it up and the main thing it allows you to do is to that you connect your device to your computer and when you hit play on your editor it directly runs the uh application on your quest although it doesn't build it it still runs it on on the de on the desktop but it shows the application on the headset so that you can reiterate quickly and debug I'll uh make sure to leave a link on of this as well if you have a Windows machine you can take advantage of that all right so uh let's let's install the uh meta Quest developer H I have a Mac machine so I'll download the Mac version and since this is really early version of it so it contains lot of improvement and Bug fixes to keep an eye on that so it may contains lot of bugs and improvements throughout the releases current version is 4.3.0 so yeah once installed I'll open up The Meta Quest developer Hub and for me did not ask me to sign in uh sign sign in because I already did if you are new and you're opening it newly you have to again sign it through the meta developer account and it should show up the same menu as as of uh now once you are here from the main uh from the left panel select uh the developer I'm sorry the device manager and connect your headset and should appear this is really well done uh based on the user experience and the design of it so you could see all the available options here once you connect you could uh see the name of your device as well as there is an uh Nifty section where you can uh see the apks that you have installed and these are the options that were mentioned in the documentation like you can cast your device device from here again it's in beta then you can uh open up a link in The Meta quest web page and a lot of other stuffs I'll leave it uh up to you to look [Music] at and it also contains an ADB command as now it's as simple as just drag and drop onto the area and it shows you two channels one is release channels if you have a distribution line setup or you can install it on the quest do note though it will override all the previously uh installed same package name in earlier we had to manually uninstall and then install it but it overrides now so it's again a good thing you may want to have all right once installed uh let me put up my quest headset and I'll show you how the app looks from the [Music] quest all right I got the quest working and you could see my screen uh cast from The Quest so open up the app uh on the drop down select unknown sources because remember we don't have this AP signed and it's not from a verified developer and not from the store either so it will appear on the unknown sources open the app and it should see made of the unity logo and there you go now you could see how you floating in the floating Evol but notice one thing that our cube is not at at our eye level but rather somewhere below and because our Quest is taking up our height already mapped from a calibration that's it we made uh our application runon [Music] Quest all right and this is how you set up your first meta XR SDK for development within Unity 3D I hope you found this video really helpful F and insightful and if you really enjoy this tutorial and you're eager to learn more V development content don't forget to give it a thumbs up as that will help uh me a lot and help out help this channel to grow make sure you hit the Subscribe button if you haven't already and turn on the notification Bell to stay updated with all our all of our upcoming tutorials and trust me you don't want to miss what I have uh planned for this channel thank you so much for tuning in today keep coding keep creating and I'll catch you in the next game five happy [Music] developing
Info
Channel: Game 5D Official
Views: 3,469
Rating: undefined out of 5
Keywords: VR Development Tutorial, Unity3D VR Programming, Meta Quest 2 Setup, Virtual Reality Game Development, VR Coding Tips, Game Development for Meta Quest, Unity Meta Quest 2 Tutorial, VR Programming Basics, How to Develop VR Games, Unity3D for Beginners, Meta Quest 2 Development Guide, VR App Development, Unity VR Project Walkthrough, Game5D Tutorial Series, Meta Quest 2 Coding Tips, Unity3D VR Best Practices, Step-by-Step VR Development, 2024
Id: ZjGoqWhd2RY
Channel Id: undefined
Length: 36min 38sec (2198 seconds)
Published: Wed Jan 24 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.