Getting Started With ARFoundation in Unity (ARKit, ARCore)

Поделиться
HTML-код
  • Опубликовано: 4 сен 2024
  • This tutorial will teach you the important basics you need to know to start building augmented reality experiences which will run on both iOS and Android.
    NOTE TO ANDROID USERS: I've discovered the steps shown in the video don't fully support Android, but never fear! @Conviley has posted a comment with two simple steps that will get everything working on Android: • Getting Started With A...
    Unity version shown: 2018.3
    Download the demo assets here:
    app.box.com/s/...
    Unity's guide to getting set up for iOS development:
    docs.unity3d.c...
    Unity's guide to getting set up for Android development:
    docs.unity3d.c...
    You can download the completed Unity project shown in this tutorial here:
    github.com/The...
    CREDITS
    3D toy plane model by "Law" (via Sketchfab), generously licensed under the Creative Commons Attribution license. I made a few modifications to the model's appearance.
    sketchfab.com/...
    creativecommon...
    Music from Epidemic Sound (www.epidemicsou...)

Комментарии • 764

  • @TheUnityWorkbench
    @TheUnityWorkbench  5 лет назад +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 5 лет назад +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 5 лет назад +1

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

    • @siarheibrazil4110
      @siarheibrazil4110 5 лет назад

      @@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 5 лет назад

      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 4 года назад

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

  • @ZeFirestarter
    @ZeFirestarter 5 лет назад +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.

  • @conviley
    @conviley 5 лет назад +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 5 лет назад +1

      yes, it helped!

    • @f612CreatorsPodcast
      @f612CreatorsPodcast 5 лет назад +3

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

    • @HoangHahalehoang
      @HoangHahalehoang 5 лет назад +7

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

    • @jonathankaufman7168
      @jonathankaufman7168 5 лет назад +4

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

    • @f612CreatorsPodcast
      @f612CreatorsPodcast 5 лет назад

      @@jonathankaufman7168 thanks!

  • @krazyxx
    @krazyxx 5 лет назад +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 ! :)

  • @davidtatis5514
    @davidtatis5514 3 года назад +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 3 года назад

      Thank you for your tip - It worked!

  • @aldigangster123
    @aldigangster123 5 лет назад +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 5 лет назад +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.

  • @shiorishin4255
    @shiorishin4255 5 лет назад +126

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

    • @MyResearchProject
      @MyResearchProject 5 лет назад

      thank you

    • @fredrikbrockert929
      @fredrikbrockert929 5 лет назад +2

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

    • @maartenpex2122
      @maartenpex2122 5 лет назад +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 5 лет назад +37

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

    • @maartenpex2122
      @maartenpex2122 5 лет назад

      @@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)

  • @Road11Ki
    @Road11Ki 5 лет назад +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 5 лет назад +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 4 года назад

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

    • @theminionshrek7946
      @theminionshrek7946 4 года назад

      Thank you sir!

    • @syedbilalsabir7037
      @syedbilalsabir7037 2 года назад

      @@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

  • @EdgarasArt
    @EdgarasArt 5 лет назад +12

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

  • @prajvas
    @prajvas 5 лет назад +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 5 лет назад +5

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

    • @marcoschikatis3412
      @marcoschikatis3412 5 лет назад

      @@maushu-p1b Thanks, man.

    • @sooryasankar1193
      @sooryasankar1193 5 лет назад +2

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

    • @prajvas
      @prajvas 5 лет назад

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

    • @sooryasankar1193
      @sooryasankar1193 5 лет назад +1

      Just replace ARSesssionOrigin with ARRayCastManager

  • @dylanthomas2616
    @dylanthomas2616 5 лет назад +19

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

  • @shadowursake
    @shadowursake 5 лет назад +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  5 лет назад

      Daniel, thanks so much for that extremely helpful tip!

    • @Rytalfo
      @Rytalfo 5 лет назад +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.

  • @jakk35
    @jakk35 5 лет назад +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

  • @saikiran-vw8ux
    @saikiran-vw8ux 5 лет назад +13

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

  • @SebHaugeto
    @SebHaugeto 5 лет назад +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 5 лет назад

      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

  • @gersonpearson4103
    @gersonpearson4103 3 года назад +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 3 года назад

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

  • @chrisharden8150
    @chrisharden8150 4 года назад +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.

  • @karandeepsingh3027
    @karandeepsingh3027 5 лет назад +5

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

  • @hnguyen5670
    @hnguyen5670 5 лет назад +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.

  • @unnanego
    @unnanego 5 лет назад +2

    Long awaited tutorial! Subscribed!

  • @jamieokeefe4231
    @jamieokeefe4231 4 года назад

    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!

  • @mk48sz33
    @mk48sz33 5 лет назад +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  5 лет назад

      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 5 лет назад +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: ruclips.net/video/kGkT3YKOGXU/видео.html
      I'm trying to figure out how the corner map is done. I haven't been able to find any tutorials.

  • @onvaboireuncanon
    @onvaboireuncanon 4 года назад

    Tutorial not updated. Read ruclips.net/video/Ml2UakwRxjk/видео.html&lc=UgySV9BKkv4nZDJzYkl4AaABAg comment to fix the problem related with new version

  • @nathanpedrenomartinez6132
    @nathanpedrenomartinez6132 5 лет назад +2

    Hi, thanks you for the tutorial but i have a several issue, when I install the plugins, I add the AR Session and the AR Session Origin but the screen is in black and it looks like the shader doesn't work properly, does anyone know how to solve it?
    Thanks you!

  • @iradmir777
    @iradmir777 5 лет назад +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

  • @f612CreatorsPodcast
    @f612CreatorsPodcast 5 лет назад +2

    Immediately, when I add this code i get an error. var cameraForward = cameraForward.current.transform.forward;
    var cameraBearing = new Vector3(cameraForward.x, 0, cameraForward.z).normalized;
    placementPose.rotation = Quaternion.LookRotation(cameraBearing); When I erase it code builds just fine

  • @knowthyself4609
    @knowthyself4609 5 лет назад +1

    @TheUnityWorkbench
    I am getting this error, how do I remove this error
    ArgumentException: Object at index 0 is null
    UnityEditor.SerializedObject..ctor (UnityEngine.Object[] objs) (at C:/buildslave/unity/build/Editor/Mono/SerializedObject.bindings.cs:34)

  • @Sam-vf2ww
    @Sam-vf2ww 5 лет назад +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 5 лет назад

      Thanks man, good help :)

  • @jamado9067
    @jamado9067 3 года назад +1

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

  • @akeyX
    @akeyX 5 лет назад +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?

  • @ruchitasamel9246
    @ruchitasamel9246 5 лет назад +3

    Even if copy pasted the entire code, I am getting the error for "Raycast" in the line arOrigin.Raycast(screenCenter, hits, TrackableType.Planes);
    Please help!!!!!

    • @crispynutella2050
      @crispynutella2050 5 лет назад +6

      The way to do this has been updated, try adding ARRaycastManager component your arOrigin
      and then use this instead
      arOrigin.GetComponent().Raycast(screenCenter, hits,UnityEngine.XR.ARSubsystems.TrackableType.Planes);

  • @fredrikbrockert929
    @fredrikbrockert929 5 лет назад +2

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

  • @olegfrolovdesign
    @olegfrolovdesign 5 лет назад +3

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

  • @ljimenez29
    @ljimenez29 5 лет назад +6

    Hi, I did all the steps of the tutorial. When I run the app on the android mobile to show the cube this works fine, but when I continue with the tutorial making the changes to show the Placement Indicator, when running the app the Placement Indicator is not visible on any surface. I am using Windows 10, Unity 2018.1.7 and ARCore.

    • @TheUnityWorkbench
      @TheUnityWorkbench  5 лет назад

      Luis, I'll look into this when I can find some time. It might be a couple weeks, though (sorry!). Can you try this with 2018.3 and see if you get different results? (That's the version I used for the tutorial.)

    • @manuelpinedo6859
      @manuelpinedo6859 5 лет назад +1

      ​@@TheUnityWorkbench hi, i have the same problem with unity 2018.3

    • @hansungkang3761
      @hansungkang3761 5 лет назад +1

      appear same problem too.... so i try to solve this problem to revise 'TrackableType.plane -> TrackableType.FeaturePoint'. this solution is a temporary measure. this link show how to operate ruclips.net/video/cuWEoh7PFTQ/видео.html
      i am using widows10, unity 2018.3 and ARcore

    • @conviley
      @conviley 5 лет назад +2

      If you add the ARPlaneManager component to the AR Session Origin gameobject the marker will appear. However, it does not perform as smooth as in the video and i'm not sure why. According to the scripting API: "When [ARPlaneManager component is] enabled, this component subscribes to planeAdded, planeUpdated, and planeRemoved. If this component is disabled, and there are no other subscribers to those events, plane detection will be disabled on the device." So it seems like you have to have the ARPlaneManager or at least something else subscribing to those events to get plane detection to enable.
      using Unity 2018.3.3f1

    • @conviley
      @conviley 5 лет назад +5

      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 jittrey)
      3. Enjoy a smooth marker! :D

  • @ainguyenvan3629
    @ainguyenvan3629 3 года назад +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

  • @maciejzareba9563
    @maciejzareba9563 5 лет назад +1

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

  • @jrM5492
    @jrM5492 5 лет назад

    Hello, do you know which versions of ARCore and ARKit does ARFoundation currently supports? Just build an app myself with arf, and for some reason, it's ground plane detection is extremely slow.

  • @Crazyaligator
    @Crazyaligator 5 лет назад +1

    my script dosen't work. i followed every single step
    (Assets\demo\ARTapToPlaceObject.cs(60,6): error CS1513: } expected

  • @jerincherian4638
    @jerincherian4638 4 года назад +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 4 года назад

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

    • @markandre8786
      @markandre8786 4 года назад +1

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

    • @markandre8786
      @markandre8786 4 года назад +1

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

    • @markandre8786
      @markandre8786 4 года назад

      @@ashashi yeah you need to add it xd

    • @jerincherian4638
      @jerincherian4638 4 года назад

      @@markandre8786 thank you so much

  • @flexmcpee
    @flexmcpee 3 года назад

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

  • @raoahmed7948
    @raoahmed7948 2 года назад

    most detailed Tutorial i ever watched THANK YOU SIR!!

  • @chrisvandenhende8808
    @chrisvandenhende8808 3 года назад

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

  • @minaskatsiokalis
    @minaskatsiokalis 5 лет назад

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

  • @diegoleao
    @diegoleao 5 лет назад

    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.

  • @micahlab9008
    @micahlab9008 10 месяцев назад

    In visual studio code, the functions and methods linked with unity don't autocomplete. What should be done for the cut completion to work properly?

  • @shrutimehta6247
    @shrutimehta6247 5 лет назад

    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

  • @Stirlits2008
    @Stirlits2008 4 года назад

    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 5 лет назад

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

  • @PlumpnDreamyWalrus
    @PlumpnDreamyWalrus Год назад

    You may or may not know the answer to this, but is Raycast incompatible with the ARCore template? I can't get Visual Studio to recognize Raycast, and I'm wondering if it's because I selected ARCore template from the beginning and you did not.

  • @captainmarvel3834
    @captainmarvel3834 5 лет назад +3

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

  • @themessengerofgood
    @themessengerofgood 5 лет назад +1

    Hi!
    I updated the unity version to 2019.2 and there was a problem with raycast component in the script:
    error CS1061: 'ARSessionOrigin' does not contain a definition for 'Raycast'
    Would you mind to help me please? How can I work around this issue?

    • @kevinsutherland3831
      @kevinsutherland3831 5 лет назад +1

      did you add the Xr class to your scripts, you must add the following.
      using UnityEngine.XR.ARFoundation;
      using UnityEngine.Experimental.XR;
      Thats where the ARSessionOrigina class and it's associated methods come from. I hope it helps.

    • @GusdeChandrariz
      @GusdeChandrariz 5 лет назад +2

      @@kevinsutherland3831 I Have the same problem,, but i already add the XR class to the script,, and its still got an error. and i download the GitHub file base on the description,, and it still didn't work

  • @maxechendu6693
    @maxechendu6693 4 года назад +1

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

  • @shtml54
    @shtml54 4 года назад +1

    Thanks for the shadow tip. So useful.

  • @awwad222
    @awwad222 3 года назад +1

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

    • @HabibYo
      @HabibYo 3 года назад

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

  • @johnculhane438
    @johnculhane438 5 лет назад

    Could someone explain what settings you'd need for ipads. I've gotten the build to work and the app to install and launch but the screen is black on the ipad. So close. In xcom there is an alternate device option for ipad in development info but it doesn't seem to make a difference. Also does it matter if the project in xcom defaults to Unity-iphone? ipad is running 12.2. Thanks.

    • @johnculhane438
      @johnculhane438 5 лет назад

      Also tried to rebuild with the target device settings in Unity set to ipad in the player settings. It still creates an "Unity-iphone" named project however. The minimum target OS goes to 11. Should that matter?

  • @StampedeGames
    @StampedeGames 4 года назад +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/

  • @Rytalfo
    @Rytalfo 5 лет назад +7

    Amazing Tutorial. Keep up the good work.

  • @maartenm8734
    @maartenm8734 5 лет назад +1

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

  • @nirmalkeerthi101
    @nirmalkeerthi101 5 лет назад +1

    I'm getting this error.
    error CS1503: Argument 3: cannot convert from 'UnityEngine.Experimental.XR.TrackableType' to 'UnityEngine.XR.ARSubsystems.TrackableType'
    please help..

  • @gachiengiongaming
    @gachiengiongaming 5 лет назад

    i have error when run on Nokia x6 : the application requires the latest version of arcore . What i can do ?

  • @manaswinkath9301
    @manaswinkath9301 3 года назад +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

  • @bstajic
    @bstajic 4 года назад

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

  • @abhijitleihaorambam3763
    @abhijitleihaorambam3763 4 года назад +1

    when I build and run my app it doesn't show anything its just blank 9:07

  • @MrPorcs
    @MrPorcs 5 лет назад

    Hi!
    Why I keep having errors when building for Xcode on my iPhone with the latest AR plugins ?
    The errors are mainly for missing skeletons library in an totally new project like you have done

  • @josephbrookeilly4824
    @josephbrookeilly4824 5 лет назад +2

    Hi, I have an error here with Raycast:
    arOrigin.Raycast(screenCenter, hits, TrackableType.Planes);
    It says: '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?)
    I have:
    using UnityEngine.XR.ARFoundation;
    using UnityEngine.Experimental.XR;
    And I use it for Android Dev.
    Thanks!

    • @siteli717
      @siteli717 5 лет назад

      plz let me know when you solved the problem......got exactly the same problem right now....

    • @gilleslasseigne6801
      @gilleslasseigne6801 5 лет назад

      The same for me :-(

    • @gilleslasseigne6801
      @gilleslasseigne6801 5 лет назад

      You have to use the 2018.3 version of Unity, In packageManager ARfoundation, ARkit and ARcore 1.0.0

    • @maushu-p1b
      @maushu-p1b 5 лет назад

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

    • @josephbrookeilly4824
      @josephbrookeilly4824 5 лет назад

      @@siteli717 Ok, see below the heroes :D

  • @MD-nt9nv
    @MD-nt9nv 5 лет назад +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!

  • @tshawnjohnson
    @tshawnjohnson 5 лет назад

    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.

  • @9885520844
    @9885520844 2 года назад

    arOrigin.Raycast(screenCenter, hits, TrackableType.Planes);
    while i am writing this line of code I am getting the error like ARSessionOrigin doesn't contain a definition for Raycast..can u please suggest about this.

    • @9885520844
      @9885520844 2 года назад

      Assets\Scripts\ToptoPlace.cs(56,18): 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?)
      here is the error that what i am getting

  • @esukumar
    @esukumar 4 года назад

    need help with the Unity 2019.4.2LTS AR foundation.
    After doing iOS build in Xcode, it does not show any frameworks. can you pls tell
    me what is problem

  • @oricoh
    @oricoh 5 лет назад

    Hi, an issue I have: When I increase the scale of the scene (minute 29:25), the placement indicator seems to position way-above the ground, and my 3D objects are now floating in the air. Any idea why? Thanks!

    • @TheUnityWorkbench
      @TheUnityWorkbench  5 лет назад

      Ori, I'm not sure why that would be. Check to make sure that the Quad nested inside your Placement Indicator object is positioned at 0, 0, 0.

  • @hameedsaraj9582
    @hameedsaraj9582 4 года назад +1

    Hello, After drag n dropping the Script file into Interaction, I didn't get the "Placement Indicator" box to drag n drop placement indicator

  • @Kwynspired
    @Kwynspired 5 лет назад

    What happens if you move the plane that you place the object on? will the object move? Or is it locked to where it's placed? Is it possible to make it move with the plan its place on?

  • @PoivronJaune
    @PoivronJaune 5 лет назад +1

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

  • @lucabrioschi9681
    @lucabrioschi9681 5 лет назад +2

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

  • @ericyearwood6472
    @ericyearwood6472 5 лет назад

    I'm trying to activate a UI that will allow me to fly the plane around after instantiating, but the buttons on my UI won't do anything. Is there something special I have to do to make a UI to work with the AR Session?

  • @lando6583
    @lando6583 4 года назад

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

  • @mendezcreative
    @mendezcreative 5 лет назад

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

  • @shyambarange
    @shyambarange 5 лет назад +4

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

  • @gokusaiyan1128
    @gokusaiyan1128 4 года назад +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

  • @hamzaal-bustanji8580
    @hamzaal-bustanji8580 4 года назад +2

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

    • @muhammadhamza3440
      @muhammadhamza3440 4 года назад

      me facing same problem

    • @muhammadhamza3440
      @muhammadhamza3440 4 года назад

      there is project HelloAR on github that works for me for plane detection and creating object on it

    • @filibertocortes8749
      @filibertocortes8749 4 года назад

      @@muhammadhamza3440 link plis

    • @muhammadhamza3440
      @muhammadhamza3440 4 года назад

      @@filibertocortes8749 contact me on m.hamza1669@gmail.com

    • @mulagraphics
      @mulagraphics 4 года назад

      @@muhammadhamza3440 add link here

  • @gaahouho6840
    @gaahouho6840 4 года назад +3

    not working anymore. i use the latest unity 2019.3.3 and xcode 11 follow all your steps. and tried to load the cube in arkit. my app just crashed all the time. by the way it's iphone xr with ios 13.3.1 running. i promise i follow all the steps with no faults but the app still crash all the time.

    • @mulagraphics
      @mulagraphics 4 года назад +1

      Its not working for me as well, this is a big problem in the new Unity3d update

  • @VIRVL
    @VIRVL Год назад

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

  • @manu.vision
    @manu.vision 5 лет назад +1

    Amazing work Kris!

  • @arielfeldman2795
    @arielfeldman2795 5 лет назад +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  5 лет назад +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 4 года назад +1

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

  • @siteli717
    @siteli717 5 лет назад +2

    need some help !My ar indicator just float in the air and can not move with my screenpoint ..... I‘ve checked the code already...

  • @siarheibrazil4110
    @siarheibrazil4110 5 лет назад

    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 :)

  • @olawalehammed4072
    @olawalehammed4072 5 лет назад

    One of the best tutorial so far!!

  • @lilyyy1324
    @lilyyy1324 5 лет назад +1

    I’m doing my fyp project and I have a problem :
    I just want user placed only one toy plane on the screen.Then, the placement indicator will be disappeared. What code should I changed to do that?
    Thanks :)

    • @TheUnityWorkbench
      @TheUnityWorkbench  5 лет назад +1

      It's not too difficult to accomplish what you describe. Here's one approach...
      Add a new property at the top of the script to track whether the user has placed an object, and initially set it to false...
      private bool placementIsComplete = false;
      Then, in the PlaceObject() method add this line...
      placementIsComplete = true;
      Finally, in the UpdatePlacementIndicator() method, change the first line of the "if" statement to this...
      if (!placementIsComplete && placementPoseIsValid)
      This isn't necessarily the most efficient approach but it's the easiest to describe adequately in a comment. :) I hope this helps!

    • @lilyyy1324
      @lilyyy1324 5 лет назад

      @@TheUnityWorkbenchIt works! Thanks a lot.!!!
      I also have another question:
      I would like to create a multiplayer game using Google ARCore Cloud Anchor. Will the object on the placement indicator be shared to other players?
      Thanks again:)

    • @TheUnityWorkbench
      @TheUnityWorkbench  5 лет назад

      Unfortunately ARFoundation doesn't support ARCore Cloud Anchor's yet (or the equivalent on the iOS ARKit side.)

    • @lilyyy1324
      @lilyyy1324 5 лет назад

      The Unity Workbench oh... btw, thanks a lot!

    • @afiqahsyazana8767
      @afiqahsyazana8767 5 лет назад

      hey, may i know how you work on that script because i already tried but none of the object appear@@lilyyy1324

  • @cokerson
    @cokerson 5 лет назад +1

    Thank you so much for making this tutorial.

  • @nathanieltutorials1371
    @nathanieltutorials1371 Год назад

    Hi there, I am having trouble in building this project on my android device. During the first stage on displaying the cube, the build was successful and the app runs automatically on my phone but after the welcome to Unity screen the AR camera won't start, it's just all black. Anyone who might know the problem? I follow all from the tutorials and I encounter no problems during the build process. Any help to clarify the issue will help. Thank you

  • @tirkdiamond
    @tirkdiamond 3 года назад +2

    Dark mode is our friend...

  • @noelomeli1520
    @noelomeli1520 4 года назад +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.

  • @p4nc4ket1me
    @p4nc4ket1me 4 года назад

    Is it possible to get more realistic lighting on Android? My main issue with AR objects is the unrealistic lighting conditions. I know Vuforia offers a better lighting solution for iOS but is there anything for Android? Thanks

  • @sweazey48
    @sweazey48 5 лет назад

    In Unity 2019.1.4f and the ARFoundations plugin 2.1.0 the ARSessionOrigin raycast method has been moved to ARRaycastManager?

    • @xpartano7722
      @xpartano7722 5 лет назад

      It seems so... There's an explanation here on how to achieve it with the latest version of ARFoundation: answers.unity.com/questions/1632653/arfoundation-arsessionoriginraycast-no-longer-exis.html

  • @midhunkrishnaks4748
    @midhunkrishnaks4748 3 года назад +1

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

  • @rebarius
    @rebarius 2 года назад +2

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

  • @lulithagihan7817
    @lulithagihan7817 Год назад +1

    hi, faced this error,
    'ARSessionOrigin' does not contain a definition for 'Raycast' and no accessible extension method 'Raycast'

  • @theleader5439
    @theleader5439 5 лет назад

    Is Arcore & Arkit free to launch and sale apps created with this software? or do I need a license to launch like vuforia? Thanks a bunch!

  • @kapilaimbulahitiya2510
    @kapilaimbulahitiya2510 4 года назад

    Hi when I right click on scene Hierarchy, It won’t appear ’XR ‘option. Could you please help me. I’m working on iMac your right click on the mouse for me it’s ‘Option’ key + mouse click.