Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Introducing ARCore: An Android AR SDK for Unity

Discussion in 'ARCore' started by matthewpruitt, Aug 28, 2017.

  1. kushG

    kushG

    Joined:
    May 25, 2017
    Posts:
    18
    Any updates on when ArCore is getting released ? Any one ?
     
    Last edited: Oct 24, 2017
    hungrybelome likes this.
  2. zeb33

    zeb33

    Joined:
    Nov 17, 2014
    Posts:
    80
    Hi
    Is it possible to subscribe to changes in camera position using session class?
     
  3. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    178
    Would like any information on this as well.
     
  4. TinaAllan

    TinaAllan

    Joined:
    May 9, 2017
    Posts:
    1
    I use Pixel XL (Android 8.0) to run.
    It show error log. 螢幕快照 2017-10-31 下午2.10.48.png
    My Android Studio had been reinstalled ,so I thought Android Studio SDK was ok.
    Other Settings`s settings as same as [https://developers.google.com/ar/develop/unity/getting-started]
    HELP~
     
  5. Twil75

    Twil75

    Joined:
    Aug 30, 2012
    Posts:
    13
  6. oriolmanya

    oriolmanya

    Joined:
    Jul 4, 2012
    Posts:
    36
    I've just updated to Unity last official version: 2017.2

    I don't want any of the VR features, and I intend to build in the lowest Android SDK version: 16 (4.1 Jelly Bean), but I can't because it gets messed up with tango library. The Error:

    Temp/StagingArea/android-libraries/libtango_3d_reconstruction_api/AndroidManifest.xml as the library might be using APIs not available in 16

    The suggestions provided are:
    Suggestion: use a compatible library with a minSdk of at most 16,
    or increase this project's minSdk version to at least 19,
    or use tools:eek:verrideLibrary="com.projecttango.tangosupport" to force usage (may lead to runtime failures)

    I tried the second, but it doesn't work. With the first, it works, but what I really want is to disable this library to get included or involved on the apk, so I can build with 16 SDK version, not 19.

    Some advice?
     
  7. zeb33

    zeb33

    Joined:
    Nov 17, 2014
    Posts:
    80
    once a plane is detected whats the best way to extend it to several metres to give you several flat metres to play on without the plane visualiser then showing?
     
  8. sagarkar

    sagarkar

    Joined:
    Dec 8, 2015
    Posts:
    20
    Hello All,

    Very happy to share ARCore version of Sahi Labs
     
    HenryAsh and roumenf like this.
  9. janla

    janla

    Joined:
    May 8, 2013
    Posts:
    13
    Hi,

    I'm trying to run the HelloAR scene on a Pixel 2 following this guide but the app keeps crashing (built with Unity 2017.2.0f3)

    Thanks!
    Jan
     
  10. ATMEthan

    ATMEthan

    Joined:
    Dec 27, 2012
    Posts:
    52
    Hello all,

    I'm running HelloAR scene and the only thing that doesn't work is the camera feed as the background. As I understand it that should be a feature within the HelloAR example scene. The app only displays the camera background blue color. I can see feature points and the app will cover found-planes with the plane triangle texture asset. But no camera feed. How come the camera feed isn't working for me? Does the HelloAR example scene need additional features implemented?

    Here's my check list:

    Development Machine:
    PC OS: Windows 10 Pro
    Unity Version: 2017.2.0b9
    Android SDK Build Tools:* Updated to 27.0.1
    Android SDK Platform Tools: 26.0.2
    Android SDK Platform:* Updated to 27
    Android SDK Tools: 25.2.5
    JDK Version: 8.0.510.16

    Development Test Device:
    Phone Model: Pixel
    Phone Android Version: 7.1.2
    Can confirm I gave the test app and arcore service camera permissions.

    Edit: After hookin' up to logcatz I'm consistently getting this error:

    11-14 16:40:41.673: E/Unity(6163): (Filename: D Line: 0)
    11-14 16:40:41.691: E/Unity(6163): Unable to acquire image buffer.
    11-14 16:40:41.691: E/Unity(6163): UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    11-14 16:40:41.691: E/Unity(6163): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    11-14 16:40:41.691: E/Unity(6163): UnityEngine.Logger:Log(LogType, Object)
    11-14 16:40:41.691: E/Unity(6163): UnityEngine.Debug:LogError(Object)
    11-14 16:40:41.691: E/Unity(6163): GoogleARCoreInternal.LightEstimateManager:GetLatestLightEstimate() (at D:\AR_Test_Project\Assets\GoogleARCore\SDK\Scripts\Managers\LightEstimateManager.cs:59)
    11-14 16:40:41.691: E/Unity(6163): GoogleARCore.Frame:get_LightEstimate() (at D:\AR_Test_Project\Assets\GoogleARCore\SDK\Scripts\Frame.cs:87)
    11-14 16:40:41.691: E/Unity(6163): GoogleARCore.EnvironmentalLight:Update() (at D:\AR_Test_Project\Assets\GoogleARCore\SDK\Scripts\EnvironmentalLight.cs:56)

    Apparently I'm constantly failing at GetLatestLightEstimate when calling "!UnityTango.Device.TryAcquireLatestImageBuffer(ref nativeImage)"
     
    Last edited: Nov 14, 2017
  11. BlackPete

    BlackPete

    Joined:
    Nov 16, 2016
    Posts:
    945
    You may need to manually give the app permission to access the camera. Happened to me as well. The permissions popup dialog doesn't seem to work with the latest set of tools for some reason.
     
  12. ATMEthan

    ATMEthan

    Joined:
    Dec 27, 2012
    Posts:
    52
    I forgot to write that but yes. The installed app and arcore service have camera permissions. I'm working on getting logs.
     
  13. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    61
    Hello @timmunity

    Do Google and/or Unity have any plans for updating the ARCore plugin for Unity? The current preview of ARCore for Unity have been out for 3 months almost, without any significant updates. I sure hope it's not abandoned, because we have plenty of good ideas to try using ARCore. Are there any updates coming in the near future?

    Thanks a lot in advance.


    Kind regards,
    Uffe Flarup
     
    hungrybelome likes this.
  14. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    178
    @timmunity Would love any information as well!
     
  15. ATMEthan

    ATMEthan

    Joined:
    Dec 27, 2012
    Posts:
    52
    @Flarup During the keynote speech in Unite Austin they said this was going to change a lot over the coming months. I bet they're mid development of a pretty big update/change to the plugin.
     
    Last edited: Nov 28, 2017
  16. ATMEthan

    ATMEthan

    Joined:
    Dec 27, 2012
    Posts:
    52
    Came back to this 2 weeks later and it automagically works.

    Only things that changed is that I'm using Unity 2017.3.0.b10 and re-downloaded the ar core unity package just in case that updated to.
     
  17. ATMEthan

    ATMEthan

    Joined:
    Dec 27, 2012
    Posts:
    52
    Does anyone have any ideas on how to initialize/shutdown/reset ARCore properly? I thought loading a scene that didn't use any ARCore components might clear out any ARCore necessary instances and then I could load an ARCore scene again and have it initialize properly but that is not the case.

    Thanks for any advice.
     
  18. kennyb

    kennyb

    Joined:
    Feb 23, 2015
    Posts:
    4
    There's a comment in the plugin code that you can't actually "connect" to an ARCore session twice in the same application lifetime, and that this is understood as a limitation that's going to be fixed. Based on my own experiments I've sort of felt like I just need to live with that limitation for now and pray it won't exist when ARCore goes 1.0. If you really, really must work around it I would suggest parenting all ARCore related stuff to an object with DontDestroyOnLoad enabled, then enable / disable it when going in and out of AR. You may need to re-initialize things because all of the pre-existing planes and such will still be there. I had too much trouble with this re-initialization process and decided to spend my time elsewhere.


    I'm having trouble getting an ARCore-enabled game to work with Gradle builds. It's an ARCore mode impelmented in a much bigger non-AR game, which has recently hit the dex limit that forces us to use Gradle instead of the internal build process. Unfortunately, when entering AR mode I get the DllNotFoundException that's a symptom of not having the ARCore preview SDK installed:

    I have installed the ARCore preview SDK, and this issue does not happen with "Interal" builds, only Gradle ones.

    I posted about the issue here and was told it's probably a Unity issue.
    https://github.com/google-ar/arcore-unity-sdk/issues/47

    My suspicion is that it's a gradle configuration issue. I've been trying to add dependencies to "tango_client_api2" and "arcore_client", along with including the "arcore_client.aar" lib that's available here (https://github.com/google-ar/arcore-android-sdk) but to no avail. I'm pretty stumped here. I'm fully comfortable with shipping the game with the tango libs it needs, for the short term I'll basically do anything to get it working. It's very annoying to have to switch to a "prototype" branch where I've stripped out a lot of critical android libs to get below the dex limit just so AR mode will work.
     
    Last edited: Dec 5, 2017
  19. danielvettorazi

    danielvettorazi

    Joined:
    Mar 8, 2016
    Posts:
    5
    hey guys... i am about to cry here! i have tried everything and i am stuck in the 'build and run' step. =/

    it seems that the are some manifest confusion in my mac.
    (i am using osx, S8 with 7.0 android, unity 2017.3, android studio updated today)

    the error:
    CommandInvokationFailure: Unable to merge android manifests.
    /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/USER/Library/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -

    stderr[
    Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/manifmerger/Merger : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    ...........
    ...
    ..
    .
    .
     

    Attached Files:

  20. kdarius43

    kdarius43

    Joined:
    Mar 16, 2015
    Posts:
    140
    Hello all,
    Is there a way I could sim all of this on a computer before pushing it to the phone.. It would help with the debug process.
     
  21. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    61
    Hello all and @timmunity
    ¨

    Is there a way to stop searching for more tracking planes, after the first tracking plane have been found?

    Basically, I just want a single plane to build on, and once that have been found I don't want any additional planes to show up. I can easily disable rendering of additional planes, but the problem is that they still exist in the ARCore session and will by hit by raycasts.

    I'm using ARCore preview 2. Thank you very much in advance for your help.


    Kind regards,
    Uffe Flarup
     
  22. kushG

    kushG

    Joined:
    May 25, 2017
    Posts:
    18
    I'm stuck on this for quite some time now. When I use SessionComponent, I need to pass a Camera object for m_firstPersonCamera in the script and it is this camera that will have the background webcam feed rendering. All good till now. But what if I need to render the background to a RenderTexture and to the screen as well ? I cannot even use another camera ( one for rendering on screen and one for rendering on Render Texture). Since there can be only one session component and it only takes one camera object (where it renders the background), I cannot get the rendering data on a RenderTexture. Is their a way to achieve this ? Rendering both on screen and Render Texture ?
     
  23. CarinaMclane

    CarinaMclane

    Joined:
    Mar 12, 2014
    Posts:
    23

    I'm pretty sure the HelloAR demo polls for new planes every frame using Frame.GetNewPlanes(ref mNewPlanes) - in our own version we move away from this polling once a plane has been interacted with in some way. Not had any issues like what you describing with regards to them still appearing.
     
  24. jtbentley

    jtbentley

    Joined:
    Jun 30, 2009
    Posts:
    1,392
    Is there a known issue with no camera permission being requested? Using Unity 2017.3f3, with or without permissions forcibly added to the manifest, the resulting app is not request camera permission, and subsequently ARCore is failing on load, and crashing out.

    Builds have also been tested out of Unity 2017.2, and 2017.1. Despite having this working a month ago (I have since updated the ARCore plugin from the google developer site), it no longer functions even on a clean project.

    Update - Now the plugin is version 2, it also means the google AR Core preview (that is installed separately) also needs to be updated. I was running a month old version of that other app.
     
    Last edited: Jan 4, 2018
  25. T-Rocktopia

    T-Rocktopia

    Joined:
    Jul 16, 2014
    Posts:
    4
    If anyone is having this issue:

    Code (CSharp):
    1. DllNotFoundException: tango_client_api2
    Then that means you installed arcore-preview2.apk (the latest version) onto your device. Tango related classes are only in the older arcore-preview.apk (the firstversion). So, the errors you are getting are telling you exactly that -- there are no Tango Api related classes in arcore-preview2.

    If you REALLY are determined to run an app running the older arcore-preview, then downgrade to arcore-preview.apk and install it on your phone. This will REPLACE arcore-preview2.apk on your device (remember to install preview2 again if you wish to use the latest arcore features).

    Honestly, I recommend using the latest if at all possible and update your project to the latest arcore preview.
     
  26. thedridge

    thedridge

    Joined:
    Jan 7, 2018
    Posts:
    1
    I'm an absolute beginner and was confused about this install- Do you use Android Studio for that install process? Or is it just a command line with the phone connected+ USB debugging enabled?
     
    Marion likes this.
  27. hgbimonti

    hgbimonti

    Joined:
    Dec 31, 2008
    Posts:
    17
    Have you find a solution? I'm having this same issue when I build with "Development build" disabled. When enabled it works properly.
     
  28. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    226
    I am checking the Java api has much more methods than the Unity api
     
  29. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    226
    How do i access the Virtual positioning service? I dont see any method for it
     
  30. bizzybee

    bizzybee

    Joined:
    Aug 26, 2014
    Posts:
    3
    Hi everyone,

    I am testing ARCore for the first time. I am using Unity and have setup all the necessary stuff.



    I am using the following SDK (but I did try all the higher versions also)


    Get a popup on phone stating ARCore "stopped working"; this is what I see if i view the log:



    I reviewed the list of devices supported, which I have hlited mine:


    Any ideas? Is Note 8 actually supported yet?

    Thanks in advance!
     
  31. cengudr

    cengudr

    Joined:
    Feb 13, 2018
    Posts:
    1
    Could I change the ARCore camera matrix information before rendering?
     
  32. Hardik029

    Hardik029

    Joined:
    Dec 15, 2017
    Posts:
    1
    How we can find and set true heading in arcore scene? In ARkit Unity AR aligment gravity and heading option is available. Is there any way to implement this in ARCore?
     
  33. paramlabs

    paramlabs

    Joined:
    Aug 19, 2016
    Posts:
    7
    I am trying to put AR object in my game scene on the base of it's GPS location in real world and also launch the app in the direction user is facing in the real world. But the problem is the object starts to place in direction of camera and not the direction in which user is facing. So how to apply true heading rotation to camera in ARCORE and place object in Scene.
     
  34. SoloChristian

    SoloChristian

    Joined:
    Oct 9, 2012
    Posts:
    520
    Is the
    Blocks Android Village
    project available for download anywhere?

     
  35. DGBatch

    DGBatch

    Joined:
    Oct 18, 2017
    Posts:
    2
    Has anyone else had issues with ARCore and the latest Android OS... I have been working on an ARCore project which was working fine, however after upgrading my Android OS for my S8 last week and now cannot get ARCore working?

    Now every scene in my project that utilizes ARCore crashes.

    Is anyone else experiencing this?
     
  36. SoloChristian

    SoloChristian

    Joined:
    Oct 9, 2012
    Posts:
    520
    I am using Android SDK v8.0 OREO and Java Development Kit V8.0_162. Anything newer crashed on me during builds.
     
  37. aximsat

    aximsat

    Joined:
    Oct 12, 2017
    Posts:
    8
    Hi,

    There is a rendering issue in ARCore. I need a landscape oriented scene in ARCore. I worked on an example scene in ARCore sdk. I changed the orientation to landscape left. I just put a game object 1m in front the camera. When I run the project everything works fine. But what my problem is, at first the game object renders in portrait mode, then it changes its orientation to landscape mode. Which means there is a flickering on game object in orientation when starting. I think this happens from ARCore itself. That is not good to go. Kindly help me to fix this issue if you can. Any help is appreciated. And thanks in advanced.
     
  38. aximsat

    aximsat

    Joined:
    Oct 12, 2017
    Posts:
    8
    Hi KushG,
    Have you got the solution to fix this. If it is please share it. Thank you.
     
  39. kushG

    kushG

    Joined:
    May 25, 2017
    Posts:
    18
    I haven't got the fix for it but I can no longer reproduce the same. Updating ArCore would have fixed it I assume
     
  40. kushG

    kushG

    Joined:
    May 25, 2017
    Posts:
    18
    I'm trying to understand how the `Tracked Pose Driver` works along with ArCore. All the example scenes of ArCore have this component attached and everywhere the `Update Type` of this component is set to `Before Render`. When I make a build with this setting I see my GameObjects a little jittery, i.e. they don't seem to stick to one single spot but keep moving by a very small distance and quite frequently. In other case, when I set `Update Type` to `Update And Before Render` , my GameObjects look very smooth, i.e they stick to one single spot and I hardly notice any position change there. The documentation here https://docs.unity3d.com/ScriptRefe...eDriver.UpdateType.UpdateAndBeforeRender.html is not helping enough. Can somebody from Unity help explain what is going on in background with `Tracked Pose Driver` and also why are the example scenes not using `Update and Before Render`

    @timmunity
     
  41. Pathorn

    Pathorn

    Joined:
    Sep 18, 2017
    Posts:
    3
    Will it work on a Tribute 5 Android phone?
     
  42. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    206
    Cromfeli likes this.
  43. Pathorn

    Pathorn

    Joined:
    Sep 18, 2017
    Posts:
    3
  44. bharath-srk

    bharath-srk

    Joined:
    Dec 28, 2017
    Posts:
    1
    I want to change detected plane of arcore

    in arcore generated plane is not perfect square or rectangle,it has no definite shape
    i want generated plane should be rectangle or sqaure like this i mean with definite shape

    WhatsApp Image 2018-08-07 at 3.48.24 PM.jpeg WhatsApp Image 2018-08-07 at 4.05.43 PM.jpeg WhatsApp Image 2018-08-07 at 3.48.24 PM.jpeg WhatsApp Image 2018-08-07 at 4.05.43 PM.jpeg
     

    Attached Files:

  45. asa989

    asa989

    Joined:
    Dec 18, 2015
    Posts:
    12
    Hey guys, Is there any way to adjust camera settings like exposure within unity? i dont want the phone camera adjust light/brightness by itself. its really bad for my app and i'd like to have control over it by myself. I know we can do it out of unity. But I cant write plugins. if there is no way, then how can I request it to unity team?

    PS: also focusing in the area that i tapped is another useful thing to have access.
     
  46. FUBAR2077

    FUBAR2077

    Joined:
    Nov 16, 2013
    Posts:
    11
    I would need exactly the same feature - there is no way to see anything near window as whole camera image from the inside goes black as it focuses on exterior.

    Let me know if you found anything @asa989
     
  47. asa989

    asa989

    Joined:
    Dec 18, 2015
    Posts:
    12
    I havent found anything yet. also camera image wont work in lightweight render pipeline!!