Search Unity

[ARCore] v1.4 | Trying HelloAR project, build succeed but nothing shows on the phone.

Discussion in 'AR' started by pbernier, Aug 7, 2018.

  1. pbernier

    pbernier

    Joined:
    Jul 30, 2018
    Posts:
    2
    Hello, i'm new to Unity and ARCore and i am trying to lauch the ARCore exemple project, but nothing is showing on my phone.
    I'm using the Unity 2018.2.2f1 and ARcore v1.4, but i had the exact same problem when i used the previous version (2018.2.1f1 and 1.3).
    I run Unity on Windows 10.
    Here is what i did :
    - I create a new project named "AR"
    - I add the " arcore-unity-sdk-v1.4.0 " package
    Assets > Import Package > Custom Package ...
    And select " arcore-unity-sdk-v1.4.0 "​
    - I select " All " to import all the package, then " Import "
    - I have now 3 CS0619 errors
    [...] error CS0619: `UnityEngine.Network' is obsolete: [...]
    [...] error CS0619: `UnityEngine.Network.player' is obsolete: [...]
    [...] error CS0619: `UnityEngine.NetworkPlayer.ipAddress' is obsolete: [...]​
    - I correct them by following thoses instructions
    - I have now 1 CS0618 warning, on 5 different files
    [...] warning CS0618: `UnityEditor.Build.IPreprocessBuild' is obsolete: `Use IPreprocessBuildWithReport instead' [...]
    So i use " IPreprocessBuildWithReport " on the 5 different files
    https://docs.unity3d.com/ScriptReference/Build.IPreprocessBuildWithReport.OnPreprocessBuild.html
    - 1 warning is still remaning, an other CS0618
    [...] warning CS0618: `UnityEngine.ScreenOrientation.Unknown' is obsolete: [...]
    I simply replaced " [...] ScreenOrientation.Unknown " by " [...] ScreenOrientation.AutoRotation "​
    - Now that i don't have any errors or warning left, i continue to follow the ArCore Tutorial
    https://developers.google.com/ar/develop/unity/quickstart-android
    (I am now at the "Open the sample scene" part)​
    - So i double clic on "HelloAR"
    Assets > GoogleARCore > Examples > HelloAR > Scenes > HelloAR
    - I keep following the tutorial (Configure build settings)
    - I when to File > Build Settings to open the Build Settings window
    - Select Android and click Switch Platform
    - Player Settings > Other Settings > Multithreaded Rendering : Disable
    - Player Settings > Other Settings > Package Name : com.Help.HelloAR
    - Player Settings > Other Settings > Minimum API Level : Android 7.0 'Nougat' (API level 24)
    - Player Settings > Other Settings > Target API Level : Android 7.0 'Nougat' (API level 24)
    - Player Settings > XR Settings > ARCore Supported : Enable​
    - Now that everything is ready, i enable developer options and USB debugging on my phone (Samsung S8+, Android version : 8.0.0), connect it to my computer and go to File > Build Settings > Build And Run.
    - Save the apk to my computer.
    - But when i launch the application on my phone, the only thing i get is this :
    (The camera is allowed to be used with the application)
    (I also tried to " Build ", and then copy the apk to my phone, it does the same thing)

    But the "fun" part, is the fact that, if i go back on Unity, delete the scene "HelloAR" and start to put 3D objects in front of the camera, i will still have this grey and blue image (sky texture) when i build the project. Doesn't mater what modification i do i will still have it.

    Does anyone know where this problem comes from and maybe how to fix it ?
    Can you think of anything i could try ?

    Thanks in advance
     
    Last edited: Aug 7, 2018
  2. pbernier

    pbernier

    Joined:
    Jul 30, 2018
    Posts:
    2
    Well ... i wasn't building the right scene, to solve this :
    - I went to File > Build Settings
    - At the top of the window i disabled Scenes/SampleScene
    - Clicked on " Add Open Scenes "
    - And Enable " GoogleARCore/Exemples/HelloAR/Scenes/HelloAR "
     
  3. RemStorms

    RemStorms

    Joined:
    Aug 9, 2018
    Posts:
    1
    Make sure the camera is set to Depth Only ;)
     
  4. Sngyq

    Sngyq

    Joined:
    Aug 20, 2018
    Posts:
    1
    Hi I am new to unity and ARcore as well.
    I am using Unity 2018.2.3f1 and ARcore v1.4.1.

    it still has the following error
    1 CS0618 warning, on 5 different files
    [...] warning CS0618: `UnityEditor.Build.IPreprocessBuild' is obsolete: `Use IPreprocessBuildWithReport instead' [...]
    I was wondering how did you manage to solve this.
     
  5. John1515

    John1515

    Joined:
    Nov 29, 2012
    Posts:
    249
    I have the same problem.
    Android 8
    IL2CCP
    .Net4
    newest ARCore package
    newest ARFoundation package
    ARCore installed on phone and working (Ikea place app)
    yet, nothing happening in Unity.
    Camera is set to depth only.

    I've tried soo many combination now... :confused: