How To Make an AR Application in Unity

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hi everyone, in this video we will learn how  to make an AR application in unity. Lets begin.   Firstly, Go to the Package manager, find AR  Foundation and ARCore XR Plugin then download.   After that, go to the project settings  and click on the XR Plugin management   and open android tab then activate the ARCore. Then right click on the   hierarcy and add XR Session. The AR Session  controls the lifecycle of an AR experience by   enabling or disabling AR on the target  platform. After that, right click on   the hierarcy and add XR Session Origin The purpose of the ARSessionOrigin is   to transform trackable features, such  as planar surfaces and feature points,  into their final position, orientation, and scale  in the Unity Scene. Also it has camera in it.   AR Camera is your device cam. Because  of it we can delete Main Camera. So,   the next step is adding AR Plane Manager.  The plane manager creates GameObjects   for each detected plane in the environment. A plane is a flat surface represented by a pose,   dimensions, and boundary points. To visualize  planes we need to create AR Default Plane.   After you create the GameObject, assign it  to the ARPlaneManager's Plane Prefab field.   After that, We add AR Raycast ManagerAlso known as  hit testing, ray casting allows you to determine   where a ray intersects with a trackable  like a plane or a point cloud. It means,   You hit a ray from the position of the finger tap  into the perceived AR world. The last step is,   add a controller for our 3d object.  For this, we will create a script.   Then define a gameobject and ARRaycastManager.  After that, define an update method and provide   the Input touch controls. If input.touchcount is  bigger than 0 and touch.phase is equal to Began.   Then add a ARRaycastHit list and  set the rascastmanager raycast.   So If touches.count is bigger than 0,   we will instantiate our gameobject based on  touched position and rotation. So thats it.   Then we need a 3d object. I will download it from  Asset store. Its a battle royale character. After   that, set your object size smaller and make  it prefab then delete it from your scene.  Then, drag your 3d object to My Object  field and drag ARRaycastManager to   RaycastManager field. So thats it We need to build our application.   There are a few settings we need to make here. Go  to the build settings and choose Android platform   and switch platform. And go the player settings.  In here, change your company and product name.  If you have Vulkan in your  Graphics APIs just delete it.  After that, choose mininum api level to 24  and change scripting backend to the ILCPP   and choose ARM64 in target architectures.   So, we are done now. Just build  your application and enjoy it.
Info
Channel: Solo Game Dev
Views: 55,216
Rating: undefined out of 5
Keywords: how to make an ar application in unity, unity ar tutorial, unity ar foundation tutorial, arcore unity, unity ar, unity tutorial, ar foundation unity, ar unity, unity ar foundation, unity ar tutorial for beginners, augmented reality tutorial, ar portal tutorial unity, ar foundation, unity augmented reality, augmented reality unity tutorial, ar tutorial, arcore tutorial, ar foundation unity tutorial, unity arcore, unity xr, Ar core, augmented reality unity, unity3d, Unity
Id: VMis54yektk
Channel Id: undefined
Length: 4min 37sec (277 seconds)
Published: Sun Dec 26 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.