Beginners guide to UNITY AR Foundation (ARKit & ARCore) - Build your first AR app from scratch!

Поделиться
HTML-код
  • Опубликовано: 1 ноя 2024

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

  • @MohdHamza
    @MohdHamza  3 года назад +7

    Hi everyone,
    I have set up a Discord server, if anyone wishes to share media files of their project or any queries, use this link to connect: discord.gg/c7KWwsumEN
    ✌️

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

      Hey. I try to make this app and transfer the apk on phone. But the phone s camera don t start. Can you help me? Please

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

      @@gabrielboiciuc2517 Is your phone supported and in developer mode?

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

      @@MohdHamza following this! I think i'm having the same problem :(
      What's the phone you used in the video/ you have? :)
      Thanks in advance

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

      @@drummsnikk5073 Hi, its a google pixel 2. Have you got a supported device ?

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

      @@MohdHamza Read the ARCore list few minutes ago.. seems I don't have a supported device... i'm desperate ahah

  • @timha7074
    @timha7074 3 года назад +23

    Your guide is still working for the newest Unity, AR Foundation and ARCore versions. First I had blackscreens too but its important that you are activating ARCore under project settings -> XR Pug-In Management ->ARCore Plugin.

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

      i get this everytime - Manifest merger failed with multiple errors, see logs
      how to solve?

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

      Thank you @Timha you saved my time

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

      OMG.IT'S WORKING :))

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

      Very helpful comment, this fixed my problem instantly!

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

      Hello. I try to make this app and i have some problems. Can you help me?

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

    HOLY BATMAN - this was so fast and easily 4 hours of content. Really great. I love tutorials this dense because you absoutely did not waste my time. I love you did this for someone who has an understanding of coding and unity. Thanks loads. More please!

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

      Glad you liked it😊

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

    THANK YOU!! I've been trying for weeks to get Unity & ARCore working together and I was on the verge of a full blown tantrum. You go pretty fast through some of the steps which I found a bit tricky, but I suppose it's better than waffling on and on like some other videos. Will be back for more :)

  • @blackwhalestudio
    @blackwhalestudio 2 года назад +7

    For people in 2022 who have the "NullReferenceException: Object reference not set to an instance of an object" error in relation to the camera not being found:
    Try adding a Camera variable on top -> public Camera camera;
    and then assign it directly in the UpdatePlacementPose method -> var screenCenter = camera.ViewportToScreenPoint(new Vector3(0.5f, 0.5f));
    This should fix the issue.

    • @ksupon9180
      @ksupon9180 2 года назад +1

      Thanks you!!

    • @fikretakcay3306
      @fikretakcay3306 2 года назад +1

      Thank you so much :)

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

      Sadly unity told that the camera variable is not assigned

    • @ArunGuni_
      @ArunGuni_ 6 месяцев назад

      @@solomon6957 is there any solution to that??

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

    Thank you brother. U literally just helped me to gain a perfect score in my Multimedia subject

  • @levenzonderleven
    @levenzonderleven 3 года назад +8

    Don't forget to select ARCore or ARKit (depending on platform) in Project Settings -> XR Plugins

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

      Whenever I do that (even with phone in developer mode etc) it doesn't build and run...
      If I unchecked it it will be just black screen or w.e. Is in the scene.

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

      @@Blessindisguise sometimes the blackscreen is because you forgot to delete the main camera! i make tutorials too, come visit!

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

    my friend you sounded more confident than most of my college teachers !!! 😭😂

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

    Great tutorial! You have been super clear, thank you.

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

    NullReferenceException: Object reference not set to an instance of an object
    Had this error from this line:
    var screenCenter = Camera.current.ViewportToScreenPoint(new Vector3(0.5f, 0.5f));
    I was trying to run your program on a laptop webcam.
    Any ideas on how to solve this?

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

      This module shall work on ARCore and ARKit supported devices. Don’t think it will work elsewhere.

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

      @@MohdHamza you haven't added a camera to the Controller. The script tries to access it though, resulting in a null error. You don't handle this in the video. Any suggestions?

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

    I am creating AR and AR Portal for Unity. I liked your first video and subscribed. Keep up the good work.

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

      Thank you very much! All the best with your project 👍🏻

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

    I don't get the last instruction...when you click on AR Camera, first in the Inspector you see on AR Camera Manager the Auto Focus, Light Estimation and Facing Direction properties, but after that you click on "somewhere" and you see "Focus Mode" and "Light Estimation Mode"...how can I do that? Can you describe this passage?
    Thanks in advance!

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

      Hi, Thanks for the comment.
      So this step can be skipped if you got the package versions correct while importing. The package versions I have written on screen as big white overlay text and also in the description box are the correct combination to use. I made a mistake while recording the video by downloading 4.1.1 versions of ARFoundation, ARKit and ARCore. So when I imported the correct version the focus mode and light estimaton had to be corrected. That's why I stressed on downloading the correct package version which I found out a bit later.
      Summary: If you stick with the package manager versions I mentioned in the description box you can use the default ARCamera gameobject without touching it and avoid doing what I did @14:29
      Hope that helps✌️

  • @ameychavan70
    @ameychavan70 2 года назад +1

    My spider folder downloaded from flaticon doesn't hav the Files Idle, jump etc...what to do ?....

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

      Hi Amey,
      Its the asset store where you will find these: assetstore.unity.com/packages/3d/characters/animals/insects/animated-spider-22986

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

    This is awesome. Straight to the point

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

    Did you add the component "ARRaycastManager" to your arController? Otherwise this will not work. No?

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

    NICE BROTHER HELPED ME ALOT

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

    Hi ..I follow all your guidelines. run it on Redmi note 7 pro device but it seems blank.

  • @MumtazKhan-yn3mb
    @MumtazKhan-yn3mb 3 года назад

    Thanks for the video, awesome stuff!! Keep it up

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

    Great tut bro!!! Thanks loads!!

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

    Amazing Tutorial! Totally helped me figure out ARCore basics.
    Any ideas on how to create an indicator on my screen, pointing to the AR Object position when I move my camera away from it??

  • @허준성-t2r
    @허준성-t2r 3 года назад +2

    Thank you for the tutorial, but I'm getting some error and warning.
    Error - Object reference not set to an instance of an object
    ARPlacement.UpdatePlacementPose()
    Warning - No active Unity.XR.ARSubsystems.
    Is there any method to solve this problem? Please help.

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

      Please ensure you are using the same package versions as I have tested and mentioned in the description box.
      It also looks like the script has a method called at the wrong place. Check your script if it matches the one in the description.
      If any issues persist connect on the Discord server to share screenshots or media files.

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

      @@MohdHamza I'm getting the same issue and I have all the right packages aND unity version. Whats you think the issue is?

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

      @@macrowaves624 replied on discord!

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

      @@MohdHamza I'am having the same error on play. How to solve?

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

      I have the same problem

  • @UR.CristianoFans-q9y
    @UR.CristianoFans-q9y 3 года назад

    i have some issue regarding to camera if i am not place game object in front of camera then it will not visible in app also but when i place it and it seems in game view then its work correctly ..and in your case your game view is totally blank ..can you help me ?

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

    after adding the ARplacement script
    in controller ->the associated script cannot be loaded.please fix any compile errors and assign a valid script.
    this message is showing.

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

    Thanks Man ! Really helpful series !

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

      Thanks for the appreciation!

  • @AS-dn3wc
    @AS-dn3wc 3 года назад +2

    Hey thanks for the tutorial, I have followed all the step, mine is Unity 2021.2 version and accordingly I have installed all other supporting settings, but after built and run it's only showing Black screen, could you please help ???

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

      Hi Arzita,
      I think with your Unity version AR Packages version 4.0 and above are more compatible.
      Another thing you can possibly check is if you have got all the components correctly setup like the AR Raycast manager, select ARCore or ARKit (depending on platform) in Project Settings -> XR Plugins and other bits.

    • @AS-dn3wc
      @AS-dn3wc 3 года назад +1

      @@MohdHamza Thanks for your quick reply, Yes I have selected correct everything, followed every step of yours, still not happening..

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

      @@AS-dn3wc Can you share screenshots on discord (link in description) of your project and player settings (especially the other settings) and XR plug-in management.

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

      @@MohdHamza hi! I'm facing the exact same issue. Just a black screen on my phone

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

      @@SrilalithaRavuri Hi, Many people have resolved them on my discord server, if you join that (link in description) you can read though the chats.
      There is no one way of resolving it. It can be due to multiple factors.

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

    The app open but there is no spider and the target icon, so just whats on my camera. can u help me?

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

      Sure, can you share project details or perhaps screenshots of your project on the discord server (link in description)

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

    Hi! I'm wondering if you have a video that covers background segmentation. I'm trying to create an AR experience where the target image "burns up", revealing more of the image's background behind it. Is this possible using camera texture/segmentation?

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

    how do you get the animator tab? the only one i can find is the animation tab

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

      On the top ribbon go to Windows -> Animation -> Animator. The animator window should show up.

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

    thank you for this great and useful tutorial.

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

      i made a couple of changes to be able to spawn multiple spiders and changed the camera from current to main too

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

    I don't know why its not working for me. After the start only one thing is visible and thats the black screen.
    Help If you can ''

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

    hello sir, i am following u tutorial but i am getting error in the script like
    [08:15:38] Assets/ARPlacement.cs(5,34): error cs1002 ; expected
    so how to correct it sir plz help sir

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

      It is very likely a semicolon or braces are missing somewhere. Try the script in the description box, hope that helps.

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

    Hi, The indicator takes a long time to appear on the ground or other flat surface, do you know what I might have done wrong?

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

      Hi, If you are seeing the indicator then I believe you haven’t done anything wrong. The time taken for the indicator depends on your device ability to scan a plane surface while mapping it and also the texture of the surface you are scanning, so a coloured textured will be scanned quicker than a white one.

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

    Hello, does AR Foundation and Lean Touch work if I deploy for WebGL?

  • @sen.chinese.tattoos
    @sen.chinese.tattoos 2 года назад +1

    I've watched a few of these tutorials now where it gets to the "Build and Run" step and then suddenly they're utilizing the file on their phone. Does anyone know of a tutorial that walks through the process of getting the file to the phone for utilization?

  • @Praveenkumar-jb3wd
    @Praveenkumar-jb3wd 3 года назад

    HI Mohamed bro.I tried following the same versions of AR packages it showed some error, then I installed the latest verified version 4.1.7 and it worked.
    Now I followed the remaining steps after building the app shows black screen only( like the ar camere bsolid color Background)
    How to fix the issue. I deleted the main camera also

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

    Good job buddy......excellent video..can you please help me that..how can i drag rotate or scale that 3d object ..

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

      Hi Anang,
      I have discussed scaling and rotating using sliders in this video: ruclips.net/video/43XRkmAmscM/видео.html
      Scaling by touch is discussed here: ruclips.net/video/ISBIu6Jzfk8/видео.html
      I haven’t built drag functions yet but will do so in the future.

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

      Thank you ...but how to rotate and drag with finger touch on screen only

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

    Great Video!!!
    Anyone knows how to get back the indicator after we're done with the changes with the object??

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

    @Mohd Hamza. Good tutorial. I wrote the code etc. But when i load app it the indicator doesn't move at all. Using 2020.3.17f. Any idea why?

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

      Its the version issue. Try following this video
      ruclips.net/video/DO2_PPjs1f4/видео.html avoid the render pipeline bit, just use the script. Should work on 2020.3

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

    Thanks for upload this video :)

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

      Thanks for your appreciation!

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

    Hey Mohd how can I contact you ??
    I'm having a final year project

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

      Hi,
      You can message me on discord (link in description)

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

    Really cool everything is progressing fine but when I start building it says "Manifest merger failed with multiple errors | Android Studio" Anyone know what the problem is?

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

    well done mate

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

    Thank you! But does it run on ios browser like chrome or safari?

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

      This tutorial is for iOS and Android devices. I think for browsers you might be looking into using WebGL build. AR in WebGL is something I have personally not done before.

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

    How do you get the app on the phone? I'm trying to develop an ar experience for the public.

    • @MohdHamza
      @MohdHamza  3 года назад +3

      Ensure your device has developer mode switched on, then plug your phone into your machine running Unity and follow from @13:30 for Android.
      For iOS devices, you can refer to this video ruclips.net/video/RzmBnllRnh8/видео.html from 25:53. He presents very clearly how to build through Xcode.

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

    Great content 👍🏻

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

    Thanks for this video. it helped me a lot with a project.
    I have just a question, how to redo the process again( to place the object somewhere else while using the app without close it and start it again)

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

      Great to hear that!
      In regards to your question first thing which comes to my mind is create a UI button which can do SceneManager.LoadScene(“Your scene”);
      This will reset the scene and work without closing and opening it again.

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

      ​@@MohdHamza Dear Sir, if you could help me alittle bit with the code with this button i would be appreciate. i should create a button and reload the scene like you said. so where should i write the code that relate to write my scene and connected to the button to reload it. THe code i have sofar is the same like you did in the video. it is for animating a robot exported from SW in AR. and everything working perfectly except this one. Thanks in advance

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

      @@Medo1549 If you don't mind can you please post your issue with screenshots in the discord server (link in description). I can understand and reply better there. Thanks

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

    Thanx, I am a beginner and I can follow you;-)

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

    Everything seemed to work perfectly but only I can see the camera turned on but I cant see the placement marker, why so?

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

      Can you share your project screenshots on discord (link in description), I think the placement indicator is not correctly created or the script injection didn't work.

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

    Hi! When I started my app, the target logo is not showing. It was palced at 0,0,0, just like the ar camera

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

      Hi,
      I hope that all the package versions and Unity versions are as per the video. If not, can you post log messages or screenshot on my Discord server (link in description).

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

    is there way to keep the scale above 1 for asset? Because navmesh does not work under scale of 1.

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

      Sure, create an empty gameobject and make this asset a child of the empty. Then scale your empty gameobject as you desire and counter it by scaling the asset.
      Hope that works✌️

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

      @@MohdHamza Hi, thank you for the reply. I made an empty object as parent and scaled it to 20, 20, 20 and made the child assets as 0.05, 0.05, 0.05. However, everything was too large in the build. Do I need to adjust the AR camera or something?

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

      @@jz9991z scale of 20 does sound large. I believe you need to make the child objects scale to 0.005. Or make the parent scale as 2 and keep children at 0.05. I would advise not to touch the AR Camera in this case.

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

      @@MohdHamza Cheers. Thanks for your help

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

    sir need help! in my controller, Ar OBject to spawn and placement indicator did not appear, i can't place the placement indicator under the AR placement Script T_T

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

      Hi Paulo,
      Try using the AR Placement script in the description, if you face further problems and wish to share screenshots or files then you can use the discord server invite link in the description.

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

    Such an amazing work bro, I just need a little help with a problem,when I tried to build the project,I got an error of build.gradle and I dont Know what that means, can you help me out please

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

    This is the error i am getting, "NullReferenceException: Object reference not set to an instance of an object
    ARPlacement.UpdatePlacementPose () (at Assets/script/ARPlacement.cs:51)
    ARPlacement.Update () (at Assets/script/ARPlacement.cs:31)"
    what could be the problem?

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

      This looks like some field is left empty as the gameobject cannot be referenced. Try checking the gameobject on which AR placement script is sitting. Check if any field is left empty.

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

      I am also getting the same error did you fix it?

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

      @@aravindnitt3403 No. but the errors reduced when i made the 'AR Camera' the made main camera.

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

      @@aravindnitt3403 apparently it worked for me even with the errors.

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

      I found problem with camera, hits array and raycast - ended up declaring a public camera variable, assigned it from unity, created the hits array in start and updated the indicator position in update, see below code
      using System.Runtime.CompilerServices;
      using System.Linq.Expressions;
      using System.Diagnostics;
      using System.Runtime.InteropServices;
      using System.Collections;
      using System.Collections.Generic;
      using UnityEngine;
      using UnityEngine.XR.ARFoundation;
      using UnityEngine.EventSystems;
      using UnityEngine.XR.ARSubsystems;
      public class PlaceOnPlane : MonoBehaviour
      {
      private ARRaycastManager raycastManager;
      List hits;
      public Camera m_MainCamera;
      public GameObject placementIndicator;
      // Start is called before the first frame update
      void Start()
      {
      raycastManager = GetComponent();
      hits = new List();
      }
      // Update is called once per frame
      void Update()
      {
      if( !m_MainCamera.enabled ){
      UnityEngine.Debug.Log("Camera is not enabled, returning");
      return;
      }
      var screenCenter = m_MainCamera.ViewportToScreenPoint(new Vector3(0.5f, 0.5f));
      UnityEngine.Debug.Log("ViewportToScreenPoint converted");
      if( !raycastManager.Raycast(screenCenter, hits) ){
      UnityEngine.Debug.Log("Raycast manager failed");
      }
      placementIndicator.SetActive(true);
      Pose pose = hits[0].pose;
      UnityEngine.Debug.Log("Set the marker position now");
      placementIndicator.transform.SetPositionAndRotation(pose.position, pose.rotation);
      UnityEngine.Debug.Log("Marker position set");
      }
      }

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

    Hello,I follow your steps and everything looks fine, but when I want to run it ,it show out that ''all compiler errors have to be fixed before you can enter play mode'' and it even can't build it.I've checked the scripts for multiple times but I still don't know where the problem is.

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

      Hi, This clearly sounds like script error. I have attached a link to the script in the description box. Paste the script and then check. If the error persists share some screenshots of your problem on Discord(link in description)

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

    I get errors on NullReferenceException: Object reference not set to an instance of an object
    ARPlacement.UpdatePlacementPose () (at Assets/Scripts/ARPlacement.cs:51)
    ARPlacement.Update () (at Assets/Scripts/ARPlacement.cs:31)

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

      Can you share your project screenshots on discord channel.

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

      @@MohdHamza I am also getting the same error. Could you please help me in that, if you understood the problem. Thanks in advance

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

      @@rajatgupta8339 Hi Rajat, This error usually pops up when a certain gameobject is not found and the script is trying to access it. Can you share screenshots of your scene to better understand your issues. Sometimes its small things we miss out.

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

      I think you have to add the component "ARRaycastManager" to your Controller gameObject to make this code work.

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

      @@ohhhinc7770 Added on AR Session Origin Gameobject, check @4:47

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

    Thank you so much, sir.. it is a big help for me as a beginner! it worked! kudos! God Bless! :D

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

      Hi Paulo, Great to hear that. Best of luck ahead!!

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

      @@MohdHamza hello sir, can i ask if you have other projects that can I learn from?

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

      @@paulogarduque324 At the moment you can follow the playlist. I haven’t uploaded any other projects on public platforms yet.

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

      @@MohdHamza thank you so much sir :D

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

    It shows a "null reference exception: object reference not set to an instance of an object" error. What should I do ?

    • @Xx-nd1rs
      @Xx-nd1rs 2 года назад

      Did you know the solution?

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

    It says object not set to an inferance for the camera in AR Placement script

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

      Can you please recheck your AR Session Origin gameobject, has it got a camera in it. Can you also check the AR Placement script has no empty field left. Check the ARCamera has all scripts as in the video. Let me know how it goes.

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

      @@MohdHamza Thanks for helping. I still get the error and the app doesn't show my phones camera

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

      @@dylanr0662 Is there a way I can see your project?

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

      @@MohdHamza you got discord I can message you pictures or videos

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

      @@dylanr0662 ​ Sorry I haven't got discord servers set up yet. Looks like I will be needing one soon. In the meantime can you share your project using google drive on my email address in the about section of this channel?

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

    Tanks man!!!!

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

    How to detect objects in AR and draw path in detected object

  • @tashaabaskaran2951
    @tashaabaskaran2951 2 года назад +1

    hi! What if i want to spawn more than one object in the scene?

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

      Hi,
      This might help: ruclips.net/video/0SuzwJfqgBY/видео.html

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

      @@MohdHamza oh thank you!

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

    Thank you for the tutorial, it's easy to follow. Just one error after building the app it says " The application requires the latest version of Google Play Services for AR". And after clicking on Continue it says the app is removed. Please help!

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

      This sounds like your device is incompatible. Devices which are listed here are compatible : developers.google.com/ar/devices

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

    Hi, I'm still having a black screen problem, even if I tick the ARCore options under Project Settings -> XR Plug-in Management. Someone can help me please?

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

      There can be multiple reasons to it. Could be versions, device or other settings. Can you share more details about your project. If you wish to share screenshots you are welcome to do so in my discord server (link in description)

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

    Great Tutorials!! I cant load my model from the assets store. I dont know why that is the case.

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

      Use the link in the description, sign in with your Unity credentials. In the editor in the package manager download first and then import. Should be straightforward.

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

      @@MohdHamza it worked. Thanks for the reply.

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

    Awesome!!

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

    Please, I am looking for a tutorial on how to play a video with audio using an image marker. In other words, user scans image marker with phone and a video with audio plays. I am finding plenty with vuforia but what about with AR Foundation?
    Thanks in advance!

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

      Sure, will be making one soon.

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

    I use ARcore but my phone camera not opening why?

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

      There can be a lot of reasons for it. First check your phone is on Developer's mode. Then check all the package versions and unity versions are in line. Hope your device is compatible with ARCore. Let me know in more detail. Hope it works!

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

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

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

      Hi,
      Can you check if your device is listed here:
      developers.google.com/ar/devices
      If not then I'm afraid it won’t work. If your device is listed then please connect with me on my discord server(link in description).

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

      @@MohdHamza ok thank you

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

    Hello, I built and run the app on Android but the screen is showing black and I can't see anything, can you tell me why this is happening. I took the code directly from description and deployed the app but it's still showing black, why is this?

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

      Hi, can you share more details about the package versions, unity version, device details, and possibly a few screenshots on discord (link in description) of the console if you get errors.

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

      @@MohdHamza sure, texted you on #general, would be great if you could check and help me out

  • @Nicole-fg8nc
    @Nicole-fg8nc Год назад

    Hi, is this considered as AR Marker-less or Marker-Based AR project?

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

      Hi, this is markerless, a marker based would be something like this ruclips.net/video/OwpRSF7X9sI/видео.html

  • @elif-du2mf
    @elif-du2mf Год назад

    how do we make this work in unity 2021?

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

    The target is appear but, the spider doesn't appear after I clicked the target. Has anyone seen the same problem? Cheers,

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

    Can I embed Unity AR Foundation (ARCore) scenes in native Android app(Android Studio) ?

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

      Never tried that honestly mate. I have tried building AR apps using Swift and xcode for iOS devices which didn't require Unity or AR Foundation. There should be something similar for Android studio.

  • @nutvers1.0n
    @nutvers1.0n 3 месяца назад

    Thanks

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

    App installed but when app opens black screen is there only

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

      Can you please check the the editor version, AR packages versions are in line?

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

      @@MohdHamza Unity 2020.2.4F1
      AR Foundation 4.0.12
      ARCore 4.0.12
      but these are the latest versions then why such problems occurs

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

      So the version I have used which reliably works is mentioned in the description box of this video. The latest versions do not necessarily work, they should be taken as reference alone. Consider this bit as a combination lock, you need the right combination to make it work. I know its not ideal but unfortunately it is how it works.

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

    NullReferenceException: Object reference not set to an instance of an object
    ARPlacement.UpdatePlacementPose () (at Assets/Script/ARPlacement.cs:49)
    ARPlacement.Update () (at Assets/Script/ARPlacement.cs:30)
    NullReferenceException: Object reference not set to an instance of an object
    ARPlacement.UpdatePlacementPose () (at Assets/Script/ARPlacement.cs:49)
    ARPlacement.Update () (at Assets/Script/ARPlacement.cs:30)
    Error my screen is black!!

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

    I followed your script but it can't create a placementIndicator filed。。

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

      Can you provide more details or perhaps send some screenshots of your project on discord channel (link in description)?

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

      @@MohdHamza sorry, i done, I made mistake in script~

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

    Hi Does this tutorial work with Unity 2019.4.17? just to save myself from being frustrated LOL

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

      It works in 2019.2 and 2020.1, I have not tested others so honestly can't confirm.

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

      @@MohdHamza Thank you so much. I guess I have to install that version. Also do you know how to use Vuforia?

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

      @@MrDestinyproduction Yes I have used Vuforia in the past, however I'm more into ARFoundation as of late.

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

      @@MohdHamza oh ok cos I’m having trouble putting my Vuforia application into my iPhone.

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

      @@MrDestinyproduction Oh, honestly can't really help with Vuforia. Just did a quick search and found this ruclips.net/video/gIsz1tAMWVs/видео.html
      Its for android and the language is different but may get what you want as his app was working.

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

    Hello.. This AR Placement Script is not working in my case. its showing its can not be loaded. have you changed or updated that script? Thanks.

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

      The script has been the same. Can you show screenshots of your log or the error message in the discord server (link in description)

  • @老子-l8r
    @老子-l8r 3 года назад

    I followed exactly what you did, but my android phone always shows a black screen?

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

      Can you share more details about your project, Unity version, package versions used etc in the discord channel using screenshots?
      Will be easier to look into it.

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

    Dude, great content and great explanation. Just one modification require, by your script placement indicator doesn't appear after projecting the 3D model so if we change our camera angle we can't project any other model in any direction. So can you please modify you script . Thank you ❤️❤️

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

      Hi Mehul,
      I assume what you are trying is not to hide the placement indicator and spawn more objects when taped on the indicator.
      You could actually modify the code:
      using System.Collections;
      using System.Collections.Generic;
      using UnityEngine;
      using UnityEngine.XR.ARFoundation;
      using UnityEngine.XR.ARSubsystems;
      public class ARPlacement : MonoBehaviour
      {
      public GameObject arObjectToSpawn;
      public GameObject placementIndicator;
      // private GameObject spawnedObject;
      private Pose PlacementPose;
      private ARRaycastManager aRRaycastManager;
      private bool placementPoseIsValid = false;
      void Start()
      {
      aRRaycastManager = FindObjectOfType();
      }
      // need to update placement indicator, placement pose and spawn
      void Update()
      {
      if(placementPoseIsValid && Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began)
      {
      ARPlaceObject();
      }
      UpdatePlacementPose();
      UpdatePlacementIndicator();
      }
      void UpdatePlacementIndicator()
      {
      if(placementPoseIsValid)
      {
      placementIndicator.SetActive(true);
      placementIndicator.transform.SetPositionAndRotation(PlacementPose.position, PlacementPose.rotation);
      }
      else
      {
      placementIndicator.SetActive(false);
      }
      }
      void UpdatePlacementPose()
      {
      var screenCenter = Camera.current.ViewportToScreenPoint(new Vector3(0.5f, 0.5f));
      var hits = new List();
      aRRaycastManager.Raycast(screenCenter, hits, TrackableType.Planes);
      placementPoseIsValid = hits.Count > 0;
      if(placementPoseIsValid)
      {
      PlacementPose = hits[0].pose;
      }
      }
      void ARPlaceObject()
      {
      Instantiate(arObjectToSpawn, PlacementPose.position, PlacementPose.rotation);
      }
      }
      // I have used a notepad to edit the script. But hope this works.

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

      ​@@MohdHamza thank you so much, for this script, this helps me a lot in my AR project.
      One more thing is that by using this script we can generate multiple objects. Is it possible to spawn only one object? I mean that suppose first I spawn the object and after that, I have changed my camera angle and again I want to spawn the object then the previous one got destroyed and at a new place, it spawns again. So on a whole screen, only one object will be there not many.
      Thankyou again... :)

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

    I cant see the properties you have in the script

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

      Hi,
      Try using the script docs.google.com/document/d/1z7xG20s7_jM7ftizfXexMd9b3ycYDfkBCPxUyRG3UNs/edit?usp=sharing . Should resolve your issue.

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

    I followed exact same and install to my phone, but doesn't work.. just black screen

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

      Hi, There can be a number of reasons for this, can you share more details about the package versions, unity version, device details, and possibly a few screenshots on discord (link in description) of the console if you get errors.

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

      @@MohdHamza unity version is 2020.3.7f1
      and I think I solved black screen problem by checking ARcore in setting, but when starts it, camera view is gone and froze I might try again and if not working, I will share it through discord.
      Thanks for your reply!! :)

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

    The information in it was great but a little bit of editing of this video could have gone a long way to making it a batter video.

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

    I see target true but spider not come when i tocuh to screen.

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

      Have you checked the fields are not empty in the inspector where you placed the AR placement script?

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

    I have issues getting it to work...
    (I see the app in my phone screen, and any objects I put in the scene but it don't use the phone's camera! It is just black if I add the sky box I see it on the phone... Two things I noticed:
    1) I go to XR Plug-in management, and check ARCore, and try to run it it doesn't run.. I just hear the window 10 error chime.
    2) I noticed when I choose "quad" the "X rotation" of "90" it shows in the scense upside down.. if I click -90 it looks fine! (The "directional light" is still above regardless).
    More info:
    I have Samsung Note 10+
    Windows 10 pro laptop
    Connected via USB-C

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

      This sounds like the AR Session is not running, can you share screenshots of your project and AR package versions you used in the discord channel?

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

      @@MohdHamza oh okay I see yes I will do that later.

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

      @@MohdHamza I just messaged you like 5 screenshots on Discord. Hopefully it helps!

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

      @@Blessindisguise Replied.

    • @AbhimanyuVenu
      @AbhimanyuVenu 8 месяцев назад

      can u tell me the fix?@@MohdHamza

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

    how can we add more than one 3d objects???

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

      Try this ruclips.net/video/0SuzwJfqgBY/видео.html

  • @XX-lx3bk
    @XX-lx3bk 3 года назад

    Well done i have subbed you

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

    Great guide, but you should have started, WARNING: WHOEVER HAVE ARACHNOPHOBIA DO NOT PROCEED.

  • @ukr-rus2496
    @ukr-rus2496 3 года назад +1

    Provide the script please

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

      Thank you for the comment, please find the link in the description :}

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

    It doesn;t work :( the target stays at one location and the spider never spawns. Any idea why?

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

      This could be because of a few reasons.
      Check that your placement indicator gameobject has a quad as a child. Additionally it should be inserted in ARplacement script. Hope that works.

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

      Yes I checked all of them multiple times, it doesn't work :(
      I have a quad and I have placed the placement indicator as one of the game objects for the script

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

      Actually i figured it out, it was a very dumb error. I forgot to import the raycast and planemanager scripts

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

      @@rithik4293 Oh great, glad it worked!

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

    Provide script so that we can copy-paste ;)

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

      Thank you for the comment, I have added the link in the description!

  • @SatyamSingh-vd1xk
    @SatyamSingh-vd1xk 3 года назад

    Can you please upload the app too if possible... please 🙏🏼❤️

    • @SatyamSingh-vd1xk
      @SatyamSingh-vd1xk 3 года назад

      Mine is not working...a lot of error in mine

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

      @@SatyamSingh-vd1xk Hi Satyam, I'll try creating a Github repository later. In the meantime can you list what errors are you getting?

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

    How do you move the app to the phone?

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

      So as shown in this case, if you’re using Android plug your phone into your computer, follow from @13:25. Make sure your mobile device has developer mode activated. The app should build up on your phone. Hope it works👍

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

      @@MohdHamza Can you give a tutorial on how to build it through xcode

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

      @@kayajones9215 : I can't create a tutorial at the moment however you can refer to this video ruclips.net/video/RzmBnllRnh8/видео.html from 25:53. He presents very clearly how to build through Xcode.

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

    hey, use github instead of docs

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

      Yeah, should have done from the beginning. Will create a repository soon!

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

    phone screen was black.

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

      Hi, there can be multiple reasons for this. Can you please explain a little more, perhaps showing your console if you got errors. Further you can post screenshots on Discord(link in description) to illustrate the issue.

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

    Can you please help me I have raised a issue in discord server ...

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

    ARCORE sucks... VUFORIA has way less issues than this XR thing

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

    It did not work

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

      Please could you explain the issue?

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

      @@MohdHamza I deleted the project. The error was with the script file that you wrote and the phone screen was simply black.

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

    Great Content ..Horrible Presentation...why do you have to speed up so much...makes it so difficult to track what happened..

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

      Thank you for the feedback!
      I thought posting an hour long video wouldn’t be helpful when more things can be covered in approx 15min. Hey, you can slow it down if required. Will keep your feedback in mind.

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

      @@MohdHamza I did follow the video that way...but at many points actions were like what the hell happened...and I had put another 10 mins to find solution and debug...I am hopeful you'll understand the difference between this and a professional course video...Still a good video..AllTheBestBro...Grow 1000x

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

      @@_shikharshukla_YT Thanks, noted!