Getting Started With ARFoundation in Unity (ARKit, ARCore)

Sdílet
Vložit
  • čas přidán 28. 08. 2024

Komentáře • 764

  • @TheUnityWorkbench
    @TheUnityWorkbench  Před 5 lety +62

    I've uploaded the project shown in this video to Github. The video description is updated with that link, but here it is for convenience: github.com/TheUnityWorkbench/tuw-arfoundation-demo

    • @amitksood
      @amitksood Před 5 lety +1

      Thanks for sharing the project files, Kris! This was really helpful. I managed to create my Android and iOS packages following you steps. iOS version worked perfectly as you instructed. But Android version is not working. When I launch the application on my Pixel 2, it doesn't show the placement indicator and because of that plane model is no getting added. One thing I noticed which publishing android version, I get Android SDK is outdated message (SDK build tool version 28.0.1 < 28.0.3). Did I miss any step?

    • @what_the_feek5568
      @what_the_feek5568 Před 5 lety +1

      @@amitksood Use android studio to update SDK to the latest version.

    • @siarheibrazil4110
      @siarheibrazil4110 Před 5 lety

      @@amitksood try to run some plane detection code sample code, I.e. arcore based.
      if it works fine than extra tunings are needed for Android :)

    • @murthy85
      @murthy85 Před 5 lety

      That's awesome mate. Tell me something. Is it possible to export the tracked data in some way? For instance, can a point cloud or a mesh be created using the tracked data so that it may be exported as an OBJ or FBX? Thanks.

    • @jerincherian4638
      @jerincherian4638 Před 4 lety

      Hi, I noticed that the placement indicator disappears when vertical walls are concerned, how can we update the placement indicator for vertical walls?

  • @conviley
    @conviley Před 5 lety +268

    For everyone having problems on android with the placement indicator not showing i got it working! This is what i did:
    1. To your AR Session Origin gameobject add the component "ARPlaneManager". (You do not need to provide a plane prefab unless you want to visualize the detected planes)
    2. In the Tracked Pose Driver component of you AR Camera change the Update Type to "Update" (The marker will still show if you omit this step but it will be super jittery)
    3. Enjoy a smooth marker! :D

    • @CityOn360
      @CityOn360 Před 5 lety +1

      yes, it helped!

    • @f612CreatorsPodcast
      @f612CreatorsPodcast Před 5 lety +3

      I see no such thing as an object called ARPlaneManager in unity

    • @HoangHahalehoang
      @HoangHahalehoang Před 5 lety +7

      the indicator shows up but it doesn't move along when I move my camera. hmmm

    • @jonathankaufman7168
      @jonathankaufman7168 Před 5 lety +4

      @@f612CreatorsPodcast It won't be in the object list. In the inspector, click "Add Component" and search for it there.

    • @f612CreatorsPodcast
      @f612CreatorsPodcast Před 5 lety

      @@jonathankaufman7168 thanks!

  • @ZeFirestarter
    @ZeFirestarter Před 5 lety +59

    Really great tutorial. Professional quality and very easy to follow, job well done sir, congratulations.
    Only one addendum, they changed something in ARFoundation with the Raycast.
    Here are some steps to follow.
    1.- Add the script to the "AR Session Origin" GameObject.
    All the steps that follow are in the same script you are working in during this tutorial.
    2.- Add to the top:
    using UnityEngine.XR.ARSubsystems;
    3.- Create a variable:
    private ARRaycastManager aRRaycastManager;
    4.- In the Start Method add:
    aRRaycastManager = FindObjectOfType();
    5.- Instead of arOrigin use aRRaycastManager
    Should look like this:
    aRRaycastManager.Raycast(screenCenter, hits, TrackableType.Planes);
    That should cover it.

  • @krazyxx
    @krazyxx Před 5 lety +62

    Very interesting tutorial and your way of explaining is really really good ! Not too fast, not too slow, pointing out interesting details, calm voice, just perfect !
    Please, continue ! :)

  • @Road11Ki
    @Road11Ki Před 5 lety +8

    Great introduction to AR Foundation. Thanks! One word of caution to those following along, versions matter. I have found that the following component versions work to recreate this app.
    AR Foundation [1.0.0-preview.22] - 2018-12-13
    ARCore XR Plugin [1.0.0-preview.24] - 2018-12-13
    ARKit XR Plugin [1.0.0-preview.20] - 2018-12-13
    Unity 2018.3.14f1
    Xcode 10.2.1 (10E1001)
    macOS 10.14.6 (18G29g)
    There are more recent versions of these components but this configuration seems to work best

    • @derekgossett5887
      @derekgossett5887 Před 5 lety +1

      Ethan thank you for the comment, I was beginning to think this comment section was retired.
      I’ve followed this tutorial multiple times, and have tried all the fixes mentioned in the comments. I keep getting an app that loads the unity logo then becomes a black screen and never does anything beyond that. I will now follow your advice and I’ll get each exact component you mentioned. Thank you again.

    • @siddharthasapkota2219
      @siddharthasapkota2219 Před 4 lety

      @@derekgossett5887 did you find any solution to this problem?? i have same problem screen going blank

    • @theminionshrek7946
      @theminionshrek7946 Před 4 lety

      Thank you sir!

    • @syedbilalsabir7037
      @syedbilalsabir7037 Před rokem

      @@siddharthasapkota2219 Hi,I am a bit late but if you are still following the tutorial, which I think you won't, follow the steps to avoid a black screen:
      build settings -->Player settings ->XR plugin Management-> tick the AR core checkbox
      hope this will resolve your issue

  • @aldigangster123
    @aldigangster123 Před 5 lety +14

    Seriously thought this was from an official unity channel. Exceptionally well made tutorial! Please consider doing more videos Sir! I'm confident that view count will reach ~500k each. Could earn you a living very soon!
    Definitely subbed and liked! Looking forward to more!

  • @kmil2010
    @kmil2010 Před 5 lety +14

    This is the best execution of any Unity tutorial I’ve ever seen. The pacing is perfect and you ex-pained all of the concepts and needed details to both follow along and carry the knowledge forward for our own use. I’m hopeful you’ll create more in the future.
    Unity should pick you up to do their official tutorials.
    Would love to see one on using the various AR remote capabilities (ARKit remote, ARFoundation remote). It seems there is extremely sparse information on these and no reliable documentation on actually getting them working.

  • @shadowursake
    @shadowursake Před 5 lety +4

    First of all, thanks for this great tutorial, it's really well explained.
    Secondly, I want to say that I had some problems with detecting the plain on my Android device, especially when switching from the floor to the table and I observed that my camera was not in focus. If someone has the same problem here is the solution I found:
    Add the "AR Camera Options" component to your "Placement Indicator" and make sure the Focus Mode is Auto. The camera will always try to find a focus point and the image doesn't look blurry anymore. Hope this helps.

    • @TheUnityWorkbench
      @TheUnityWorkbench  Před 5 lety

      Daniel, thanks so much for that extremely helpful tip!

    • @Rytalfo
      @Rytalfo Před 5 lety +1

      Tip to go along with this: Make sure you have updated AR Foundation to Version 1.0.0 preview-22 in order to get the "AR Camera Options" component.

  • @EdgarasArt
    @EdgarasArt Před 5 lety +12

    A REALLY, REALLY, REEEEALLY SMOOTH TUTORIAL. WELL DONE!

  • @dylanthomas2616
    @dylanthomas2616 Před 5 lety +19

    Your videos are exceptionally well done and explained. Also, not many other people explain the why in addition to the how. Thanks.

  • @davidtatis5514
    @davidtatis5514 Před 3 lety +26

    Solution for the problem of black background and no permission asks: Go to the player settings -> XR Plugin -> XR Plugin Management and then in iOS enable the ARKit box and the ARCore box in the Android part

    • @talsznicer
      @talsznicer Před 3 lety

      Thank you for your tip - It worked!

  • @saikiran-vw8ux
    @saikiran-vw8ux Před 5 lety +13

    Wooooow, the way you explained the little details and the tips are awesome.... Expecting a lot videos from you!

  • @shiorishin4255
    @shiorishin4255 Před 5 lety +126

    ARSessionOrigin.Raycast() has been moved to ARRaycastManager.Raycast(), just use the ARRaycastManager as a new component on your AR Origin GameObject

    • @MyResearchProject
      @MyResearchProject Před 5 lety

      thank you

    • @fredrikbrockert929
      @fredrikbrockert929 Před 5 lety +2

      Thank you very much!
      More on this: docs.unity3d.com/Packages/com.unity.xr.arfoundation@2.0/manual/migration-guide.html

    • @maartenpex2122
      @maartenpex2122 Před 5 lety +1

      Being a novice in C+ scripting what would the code look like? I was able to add the component to the AR Origin GameObject, but was unable to adjust the script accordingly. Could you make the correct code accessible in some way?

    • @erik_natzke
      @erik_natzke Před 5 lety +37

      @@maartenpex2122 arOrigin.GetComponent().Raycast(screenCenter, hits, UnityEngine.XR.ARSubsystems.TrackableType.Planes);

    • @maartenpex2122
      @maartenpex2122 Před 5 lety

      @@erik_natzke Hi Erik, thanks for the quick repsonse! That worked like a charm. Could you tell me why I am now not able to add the Toy plane prefab? It gives me the following when I try to add it to the scene:
      Unable to instantiate prefab. Prefab may be broken.
      UnityEditorInternal.InternalEditorUtility:HierarchyWindowDrag(HierarchyProperty, Boolean, HierarchyDropMode)
      UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

  • @karandeepsingh3027
    @karandeepsingh3027 Před 5 lety +5

    Best Explained tutorial I ever saw on any AR related topic. Cheers !!

  • @chrisharden8150
    @chrisharden8150 Před 4 lety +1

    This was really excellent. Not only in content, but also in production quality. I can see you put a ton of time to make it so clear. Thank you.

  • @hnguyen5670
    @hnguyen5670 Před 5 lety +1

    I watched a couple of Unity & ARkit tutorials. This is one of the best! Very clear and most up-to-date with the tools.
    I just subscribed to your channel.

  • @jakk35
    @jakk35 Před 5 lety +4

    For people having problem with the placement indicator being stuck, not moving, or rotating. What you need to do is add the following components to your AR Session Origin:
    -AR Raycast Manager (Sript)
    -AR Plane Manager (Script)
    Hope this helps

  • @unnanego
    @unnanego Před 5 lety +2

    Long awaited tutorial! Subscribed!

  • @jamieokeefe4231
    @jamieokeefe4231 Před 4 lety

    Holy cow... I don't have a mac or an android device so I need to wait until I have access to either of those to build to a device, but this is a fantastic tutorial. I'm already proficient in unity, but I didn't feel like you were wasting any time at all. You were really easy to follow and explained everything perfectly. Thanks!

  • @jamado9067
    @jamado9067 Před 3 lety +1

    Amazing, explained it very good, knows how to speak English and shows how to do everything, that earned my sub.

  • @mk48sz33
    @mk48sz33 Před 5 lety +3

    Thank you so much! What a great tutorial! You should put a complete course together. I would be the one to buy it. I have not seen anyone explain the coding so well. Usually they just go through it and just tell you what to write without any explanation or logic.

    • @TheUnityWorkbench
      @TheUnityWorkbench  Před 5 lety

      So glad you found it helpful and like the style, Ebrahim. I promise to make more, it's just a matter of caving out the time. Please post suggestions on any specific general or AR-specific Unity topic you're interested in seeing me cover.

    • @mk48sz33
      @mk48sz33 Před 5 lety +1

      @@TheUnityWorkbench Thanks! One thing that I think would be really interesting to see is how to create indoor maps also showing you on the map. Please see link for sample video: czcams.com/video/kGkT3YKOGXU/video.html
      I'm trying to figure out how the corner map is done. I haven't been able to find any tutorials.

  • @iradmir777
    @iradmir777 Před 5 lety +2

    First of all thanks for the amazing tutorial, was really helpful. For those who were unable to see the placement indicator:
    1. Device should support arcore( i have rooted redmi note 7 device which officially does not support ARcore after root everything should work fine).
    2. Depending on your camera quality and lighting conditions it may take some time for indicator to appear
    3. If scene is not working uncheck x86 under target architectures in player settings
    4. In the new versions of AR foundation you don't need to check AR core support under XR settings
    Thanks again. I am planning to create AR application using Chrome browser, hopefully you can give me some tips

  • @fredrikbrockert929
    @fredrikbrockert929 Před 5 lety +2

    Fantastic!
    Finally a great ARFoundation tutorial.
    Even I could follow along.

  • @olegfrolovdesign
    @olegfrolovdesign Před 5 lety +3

    Thanks a lot! Clear explanation. Can't wait for your new tutorials.

  • @maciejzareba9563
    @maciejzareba9563 Před 5 lety +1

    Make part 2! Very good tutorial for people that have to make application on ios + android at same time!

  • @flexmcpee
    @flexmcpee Před 3 lety

    Brilliant stuff and so well explained. Not many people have the knack of explaining things well enough but you do....👍

  • @minaskatsiokalis
    @minaskatsiokalis Před 5 lety

    Very good tutorial for ARFoundation, especially for beginners. Please continue create content on ARFoundation and keep up the good work!

  • @Stirlits2008
    @Stirlits2008 Před 4 lety

    Thanks for the great tutorial! Please do more. I have never seen as good explanation as yours. It helped me a lot in my project.

  • @mikeyura
    @mikeyura Před 5 lety

    That was a better tutorial than anything I've seen for ARKit. Thanks so much

  • @maartenm8734
    @maartenm8734 Před 5 lety +1

    This tutorial is pure heaven, thanks for the opportunity to learn! ;)

  • @shrutimehta6247
    @shrutimehta6247 Před 5 lety

    Wow I just learned mobile and AR with this video was struggling with the settings, thanks for the detailed and to the point veio. ENJOYED IT

  • @captainmarvel3834
    @captainmarvel3834 Před 5 lety +3

    Damn it! So good! Continue and you will have 1KK subscribers bro! Awesome!

  • @Rytalfo
    @Rytalfo Před 5 lety +7

    Amazing Tutorial. Keep up the good work.

  • @chrisvandenhende8808
    @chrisvandenhende8808 Před 3 lety

    This tutorial was EXCELLENT! Thank you so much The Unity Workbench!

  • @raoahmed7948
    @raoahmed7948 Před 2 lety

    most detailed Tutorial i ever watched THANK YOU SIR!!

  • @bstajic
    @bstajic Před 4 lety

    Amazing video! Thank you for taking your time to produce an AR tutorial video of this level od quality.

  • @MD-nt9nv
    @MD-nt9nv Před 5 lety +2

    Amazingly clear and well presented material. You have an amazing talent at teaching this material and presenting it in a clear and concise manner. Hope to see more!

  • @maxechendu6693
    @maxechendu6693 Před 4 lety +1

    Thank you so much for this.
    Very smooth and understandable.

  • @shtml54
    @shtml54 Před 4 lety +1

    Thanks for the shadow tip. So useful.

  • @lucabrioschi9681
    @lucabrioschi9681 Před 5 lety +2

    Great explanation!
    I would like many more tutorials from Unity Workbench

  • @PoivronJaune
    @PoivronJaune Před 5 lety +1

    Great tutorial, you have a superb way of explaining technical stuff. Thanks.

  • @awwad222
    @awwad222 Před 3 lety +1

    Thank you so much. You are great at explination!!! You gave me so much information. Thank you Sir so much :).

    • @HabibYo
      @HabibYo Před 3 lety

      How to Update 'Raycast' in this line of code to AR Foundation New version?
      arOrigin.Raycast(screenCenter, hits, TrackableType.Planes);

  • @tshawnjohnson
    @tshawnjohnson Před 5 lety

    Thank you so much for this tutorial. The voicing was professional and clear, which made it easy to follow. I would love to see a version of this, or a video addendum, that addresses using tracking images.

  • @lando6583
    @lando6583 Před 4 lety

    amazing tutorial. I've watched it at least 3 times fully!

  • @prajvas
    @prajvas Před 5 lety +13

    Have a problem getting the Raycasting. The compiling does not occur and throws up this error. Any help is appreciated :) .Error CS1061: 'ARSessionOrigin' does not contain a definition for 'Raycast' and no accessible extension method 'Raycast' accepting a first argument of type 'ARSessionOrigin' could be found (are you missing a using directive or an assembly reference?) (CS1061) (Assembly-CSharp)

    • @maushu-p1b
      @maushu-p1b Před 5 lety +5

      docs.unity3d.com/Packages/com.unity.xr.arfoundation@2.0/manual/migration-guide.html#arraycastmanager

    • @marcoschikatis3412
      @marcoschikatis3412 Před 5 lety

      @@maushu-p1b Thanks, man.

    • @sooryasankar1193
      @sooryasankar1193 Před 5 lety +2

      @@maushu-p1b Thanks! I too got this issue and fixed now.

    • @prajvas
      @prajvas Před 5 lety

      soorya Sankar I don’t know to code, can you guide me as to how you fixed the issue 😊.. noob at coding

    • @sooryasankar1193
      @sooryasankar1193 Před 5 lety +1

      Just replace ARSesssionOrigin with ARRayCastManager

  • @StampedeGames
    @StampedeGames Před 4 lety +1

    If you're wondering how to test and debug AR features in Unity Editor, here is a plugin I wrote for this purpose.
    I hope it will save someone hours of compilation time after every minor change.
    AR Foundation Editor Remote:
    forum.unity.com/threads/ar-foundation-editor-remote-test-and-debug-your-ar-project-in-the-editor.898433/

  • @shyambarange
    @shyambarange Před 5 lety +4

    Thanks for the great tutorial 👍 One of the best AR Tutorial.

  • @mendezcreative
    @mendezcreative Před 5 lety

    great tutorial. short and to-the-point. million thanks!

  • @cokerson
    @cokerson Před 5 lety +1

    Thank you so much for making this tutorial.

  • @gersonpearson4103
    @gersonpearson4103 Před 3 lety +2

    I'm just starting off with AR I'd appreciate any help i can get. I deployed the app to my iPhone from Xcode but all i get is a black screen. How can i fix that?

    • @HabibYo
      @HabibYo Před 3 lety

      How to Update 'Raycast' in this line of code to AR Foundation New version?
      arOrigin.Raycast(screenCenter, hits, TrackableType.Planes);

  • @arielfeldman2795
    @arielfeldman2795 Před 5 lety +1

    Thanks! what a great tutorial! perfect! I really liked the way you walk us through the code with the level of details you choose to talk about... and it also very clear that the force is strong with you!...
    please do more!, especially for ARFoundation... this thing is creasy new and should have much more information about it.

    • @TheUnityWorkbench
      @TheUnityWorkbench  Před 5 lety +1

      Thanks for the positive feedback, Ariel! I've already got the next ARFoundation video planned and started. If you have specific questions, techniques, or challenges you'd like to see covered LMK.

    • @MartinVaupell
      @MartinVaupell Před 4 lety +1

      @@TheUnityWorkbench you might want to update it, its outdated.

  • @manu.vision
    @manu.vision Před 5 lety +1

    Amazing work Kris!

  • @siarheibrazil4110
    @siarheibrazil4110 Před 5 lety

    Thanks for the tutorial. Interesting way to use scene's scale to shrink the object, instead of making objects smaller.. I will retype the code, when I will have a time :)

  • @CesarSanchezQuiros
    @CesarSanchezQuiros Před 2 lety

    Sorry for the lack of respect from me. I did the tutorial and I did not use the like button to help more people to reach this good video. Thanks for sharing your knowledge

  • @KN-sc4up
    @KN-sc4up Před 4 lety

    Great tutorial, thank you so much! Please, consider make some more of this :)

  • @diegoleao
    @diegoleao Před 5 lety

    For many of you with problems, ARFoundation have evolved a lot since this video (it is in preview after all). To be able to follow this, look at 4:17 at the versions of each Package. Try to get those specific versions of the packages in the Package Manager, by clicking the arrow beside the package name and then "See all versions". Having said that, for some reason, it only worked here with AR Foundation "preview.6 - 1.1.0", which is one version above what is shown in the video. Also, if you are using Android, there is a comment by Conviley which fixes the Indicator not showing.

  • @olawalehammed4072
    @olawalehammed4072 Před 5 lety

    One of the best tutorial so far!!

  • @VIRVL
    @VIRVL Před rokem

    You. explain everything sooo good.. thanks soo much..

  • @jamestrevarthan8639
    @jamestrevarthan8639 Před 5 lety

    Amazing tutorial! I can't wait to see future videos. :)

  • @Oxmond
    @Oxmond Před 4 lety +1

    Great Tutorial. Well done! 👍🤓

  • @aadityakiran_s
    @aadityakiran_s Před 4 lety

    Very useful, well thought out and organised tutorial. Really appreciate the upload sir. Thank you.
    Edit: Why aren't you uploading anymore?

  • @junio22bk
    @junio22bk Před 5 lety +2

    You are a great teacher!

  • @wulumgames
    @wulumgames Před 5 lety

    This is the perfect tutorial to start with ARFoundation. We were waiting for this for a long time. Thanks. It is great. When do you plan to have more?

    • @TheUnityWorkbench
      @TheUnityWorkbench  Před 5 lety

      Wulum, I’m very anxious to do more but I’m in the midst of a big move and job change, so my free time is scarce at the moment. I hope to be getting back into video making in the next month or two.

    • @wulumgames
      @wulumgames Před 5 lety

      @@TheUnityWorkbench Thanks for your honest response. Right now we're preparing a Demo of our next game using what we learned on this tutorial. We hope that soon you'll be able to create another where we can scale, rotate a scene, and Raycast Game Objects.

    • @wulumgames
      @wulumgames Před 5 lety

      @@TheUnityWorkbench BTW: here you can see what we create with your tutorial. czcams.com/video/E1cT2pL4C1w/video.html

  • @hamzaal-bustanji8580
    @hamzaal-bustanji8580 Před 4 lety +2

    I have problem with raycast code there is no definition for it
    any help please how to fix this error ?

  • @orlandoalmario
    @orlandoalmario Před 2 lety

    The quality of this video and your explanation are really top level, if you have an online course or any pay material, please let me know because you have buyer on me!

  • @tirkdiamond
    @tirkdiamond Před 3 lety +2

    Dark mode is our friend...

  • @peterhamlin1296
    @peterhamlin1296 Před 5 lety +1

    Wow! really good. Thanks for sharing

  • @Guillermo88077
    @Guillermo88077 Před 5 lety

    Very interesting tutorial! Thanks for sharing with us!

  • @mohsenkheyrabadi4458
    @mohsenkheyrabadi4458 Před 3 lety

    That was an awesome tutorial! Thanks!

  • @rabbitskywalk3r
    @rabbitskywalk3r Před 5 lety

    amazing tutorial.. thanks a lot.would be really cool to see some UI tutorials in the future.

  • @MarkusYT730
    @MarkusYT730 Před 5 lety

    Super cool tutorial! Thanks a lot! More of this stuff would be great :)

  • @roshanvemana8250
    @roshanvemana8250 Před rokem

    great video, enjoyed a lot. clear explanation thanks!

  • @morto360
    @morto360 Před 5 lety

    Does it count if I keep pressing the like button over and over again???
    Great tutorial, this single tutorial answered all my questions I had. I was ready to search for multiple videos to get all my answers, but this first video answered all of them!!

  • @SebHaugeto
    @SebHaugeto Před 5 lety +7

    Thanks for the tutorial!
    I'm following without any errors up until 09:00. After that it stops - I can't launch the first iOS build on my iPhone 7. When I try to run the iOS build from Xcode, I'm getting 76 error messages about "undefined symbols". Any ideas on what might be causing these issues?

    • @tavochirivella
      @tavochirivella Před 5 lety

      I had the same problem and found a fix for me, it was because at the package manager in min 4:11 I installed the updated ARFoundation-Arkit-ARcore 2.0 versions, the correct versions are the 1.0 versions, if you see closely the moment he installs in the video and pause youll see the correct versions.. same answer here => forum.unity.com/threads/error-when-building-samplescene-from-arfoundation-to-iphone-6s.545338/#post-4629886

  • @md.rabiulalamhridoy7391

    Your video making is so nice that i wanna hug you. Respect from me sir.

  • @paulsheridan3182
    @paulsheridan3182 Před 5 lety

    That was awesome, thank you so much 👍🏼

  • @midhunkrishnaks4748
    @midhunkrishnaks4748 Před 3 lety +1

    when i build and run the project with that cube only it is showing only a black screen.

  • @glennng7022
    @glennng7022 Před 5 lety +3

    Nice video, thank you very much for your sharing

  • @sooryasankar1193
    @sooryasankar1193 Před 5 lety

    Please make it as a series.
    Greate tut!

  • @haraldgundersen7303
    @haraldgundersen7303 Před 5 lety

    Great basic tutorial... Very easy to follow...

  • @vfxfisher
    @vfxfisher Před 4 lety

    I would like to thank you for this tutorial. I find it very helpful. Unfortunately, under the new builds ARFoundation is different with respect to the AR Session Origin. This is something I need to learn to take this fine tutorial and adjust it to the new build(s). I have tried to go back to the version you use, but I encounter a number of build errors.
    Regardless; thank you for this tutorial. I enjoy your teaching style as it resonate well with me.

  • @brian9790
    @brian9790 Před 3 lety +2

    Does not work. I was able to screen the cube only. The recognition of the environment does not work at all. I belive the state just gives a false back - whyever. No explanation from the uploader and unfortunately no updated video.

    • @flckevin9972
      @flckevin9972 Před 3 lety

      I tried to debug by putting text to UI and if it detect any hits then I can see it in the build, but sadly it does not work, tutorial is outdated af

  • @ainguyenvan3629
    @ainguyenvan3629 Před 3 lety +1

    i have a problem when i open app in my android device. "this application requires the latest version of ARCore", please help me. Thanks

  • @manaswinkath9301
    @manaswinkath9301 Před 3 lety +1

    a complete black screen on android.........even on the cube test
    the app is not even prompting for camera permission.....
    please help its been 2 days i am stuck

  • @marythompson9116
    @marythompson9116 Před 5 lety +1

    Good tutorial. Thank you!

  • @Xiloe
    @Xiloe Před 5 lety +4

    For everyone having issues with Unity 2019.2.0f1 and ARCore - ARFoundation 2.2.0 on Android here is a working code
    you will also need to add an AR Raycast Manager, an AR Plane manager with empty prefab and an AR Point Cloud manager with an empty prefab too like
    Conviley said in your AR Session Origin object
    using System;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.UI;
    using UnityEngine.XR.ARFoundation;
    using UnityEngine.XR.ARSubsystems;
    public class ARTapToPlaceObject : MonoBehaviour
    {
    public GameObject objectToPlace;
    public GameObject placementIndicator;
    public ARRaycastManager raycastManager;
    private Pose placementPose;
    private bool placementPoseIsValid = false;

    void Start()
    {
    raycastManager = FindObjectOfType();
    }
    void Update()
    {
    UpdatePlacementPose();
    UpdatePlacementIndicator();
    if (placementPoseIsValid && Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began)
    {
    PlaceObject();
    }
    }
    private void PlaceObject()
    {
    Instantiate(objectToPlace, placementPose.position, placementPose.rotation);
    }
    private void UpdatePlacementPose()
    {
    var screenCenter = Camera.main.ViewportToScreenPoint(new Vector2(0.5f, 0.5f));
    var hits = new List();
    raycastManager.Raycast(screenCenter, hits, TrackableType.Planes);
    placementPoseIsValid = hits.Count > 0;
    if (placementPoseIsValid)
    {
    placementPose = hits[0].pose;
    var cameraForward = Camera.main.transform.forward;
    var cameraBearing = new Vector3(cameraForward.x, 0, cameraForward.z).normalized;
    placementPose.rotation = Quaternion.LookRotation(cameraBearing);
    }
    }
    private void UpdatePlacementIndicator()
    {
    if (placementPoseIsValid)
    {
    placementIndicator.SetActive(true);
    placementIndicator.transform.SetPositionAndRotation(placementPose.position, placementPose.rotation);
    }
    else
    {
    placementIndicator.SetActive(false);
    }
    }
    }
    Ask me if you have issues Catzy™
    #0666

    • @sebasrez
      @sebasrez Před 5 lety +2

      Placement Indicator is unfortunately still staying in place for me. Using 2019.2 latest versions.

    • @jeffreyhawkins8714
      @jeffreyhawkins8714 Před 5 lety

      When it runs it seems to take a long time recognizing the floor. I'm still placing cubes but they are in mid-air and not on the floor.

  • @rebarius
    @rebarius Před 2 lety +2

    ARSessionOrigin is not exposing the Raycast method anymore. What should we use instead?

  • @noelomeli1520
    @noelomeli1520 Před 4 lety +1

    At the 4:40 mark, if you don't see XR in the menu options, quit Unity and open it back up. XR should now be in the menu.

  • @Taobyby
    @Taobyby Před 5 lety

    Thank you!
    More of those please :)

  • @blessonroy5668
    @blessonroy5668 Před 5 lety +1

    Loved it!!
    Subscribed!!
    Do upload new videos introducing new features of ARFoundation/ARKit and ARCore.
    Looking forward to more such videos. :)

  • @BobBobbityBobson
    @BobBobbityBobson Před 5 lety

    Become a teacher mate, you'll usher in a new generation of young ones. Fantastic tutorial

  • @BurtBot
    @BurtBot Před 2 lety

    Great video! You should make more. Gosh!

  • @jakubczyz541
    @jakubczyz541 Před 3 lety +1

    i've got a black screen when i turned it on, my device is samsung A7

  • @gokusaiyan1128
    @gokusaiyan1128 Před 4 lety +1

    I followed til 09:14 and I am using android device. The app opens but It never shows the cube. It asked for camera permission too, i gave it but I can't see the cube

  • @ALlENBEAN
    @ALlENBEAN Před 5 lety

    I love your tutorial. Do you have more videos or website that I can watch and learn for AR stuff? Thank you very much for good work!

  • @Sam-vf2ww
    @Sam-vf2ww Před 5 lety +3

    Assets\ARScript.cs(36,52): error CS1503: Argument 3: cannot convert from 'UnityEngine.Experimental.XR.TrackableType' to 'UnityEngine.XR.ARSubsystems.TrackableType'
    SOLUTION: You must remove using UnityEngine.Experimental.XR; and replace with using UnityEngine.XR.ARSubsystems;

    • @Jot7000
      @Jot7000 Před 5 lety

      Thanks man, good help :)

  • @akeyX
    @akeyX Před 5 lety +1

    One question, so the ARKit XR package features used in your scene are basically ARKit Plugin (from bitbucket) features? Or is there a difference in terms of camera scripts, plane detection and so on?

  • @jerincherian4638
    @jerincherian4638 Před 4 lety +4

    In android,the placement indicator is being shown at the start,but it just stays there and does not move along with the camera. any idea why ?
    And also the cube is not being placed on the click.

    • @sakshamgupta5123
      @sakshamgupta5123 Před 4 lety

      I have the same issue so if someone could help with this it would be greatly appreciated

    • @markandre8786
      @markandre8786 Před 4 lety +1

      Add or require an ar raycast manager to the arr session origin if you are using unity 2019.2

    • @markandre8786
      @markandre8786 Před 4 lety +1

      And also a plane manager i think in the ar session origin

    • @markandre8786
      @markandre8786 Před 4 lety

      @@ashashi yeah you need to add it xd

    • @jerincherian4638
      @jerincherian4638 Před 4 lety

      @@markandre8786 thank you so much

  • @amitksood
    @amitksood Před 5 lety +1

    Very well explained.

  • @risesoft4322
    @risesoft4322 Před 5 lety

    Best tutorial i ever saw