Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question ARFoundation android app not working

Discussion in 'AR' started by gteodoro, May 30, 2022.

  1. gteodoro

    gteodoro

    Joined:
    May 23, 2022
    Posts:
    1
    Hello, i am new to unity and using ARFoundation for my first augmented reality application, i got a problem when building my application and posting it on the phone, when the phone is grant acces to the camera the app just closes and stops working.
    When i build i get those warnings on the unity. upload_2022-5-30_18-50-44.png
    It would be nice if someone knows how to solve this.
    Thank you.
     
  2. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,025
    Are you trying to run your project in the Editor Play mode? AR Foundation 4 does not support AR features in Play mode-- you would need to build to device to use AR functionality.

    For help getting your first builds working on device, you could try building our Samples:
    https://github.com/Unity-Technologies/arfoundation-samples

    Otherwise, make sure you have set up the Google ARCore XR Plug-in as documented here: https://docs.unity3d.com/Packages/c...@5.0/manual/index.html#provider-plug-in-setup
     
    Last edited: Jun 3, 2022
  3. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,025
    Last edited: Jun 3, 2022
  4. CameronFox

    CameronFox

    Joined:
    Aug 5, 2017
    Posts:
    2
    I saw this feed and I am trying to go through this video tutorial but I am running into issues with the packages either not running correctly or giving me errors saying the scripts from the downloaded packages are not working correctly.

    I am working off of a Windows laptop and I have a Google Pixel 2 Android Phone I am trying to build with. I was only able to get this prompt to see it needs my camera when typing that description in the IOS section but I can not get past that as I am just stuck with a black screen. I have been following along and installing the packages to the specified version in the video but by the 7 minute and 30 second mark of the video my build will not run correctly as shown a little later on what I should be seeing from my phone.

    Can anyone help?
     
  5. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,025
  6. CameronFox

    CameronFox

    Joined:
    Aug 5, 2017
    Posts:
    2
    When testing and checking the setup to make sure I am getting things done correctly. I first tried going through and installing the packages that are set as verified for using Unity 2019.4.4f1. But after installing the packages I end up with the following errors. I don't think there should be any problem with using new versions of the packages as these versions are labeled by Unity to work with the Unity version 2019.4.4f1 that I am in.
    These are the error I see and I have the packages listed installed, I have the configuration for IOS and Android done and I have the modules also already added in as well.

    The top two errors also occurred right after the ARCore XR Plugin was installed.
    upload_2022-10-9_15-26-56.png

    I have the build settings also current set to Android. I have not connected and ran the app through my phone or set up the AR camera system as I want to see if I can fix these errors first.

    All help is be appreciated!
     
  7. davidmo_unity

    davidmo_unity

    Unity Technologies

    Joined:
    Jun 18, 2019
    Posts:
    99
    2019.4 is no longer supported. I recommend you move to the latest LTS release.

    Also you should ensure that you are using the verified packages for development on a given Unity version to ensure that all the packages play nicely together.