Search Unity

Resolved ARKit support for iOS via Unity-ARKit-Plugin

Discussion in 'AR' started by jimmya, Jun 5, 2017.

Thread Status:
Not open for further replies.
  1. planetmatrix

    planetmatrix

    Joined:
    Dec 8, 2015
    Posts:
    38
    Where exactly does this code goes?
     
  2. cgallello

    cgallello

    Joined:
    Jul 29, 2016
    Posts:
    3
    Hey there. When I run the UnityARkitRemote app on my phone, Unity is able to display live video from my phone, but on the phone it still says "Waiting for editor connection", although the dialog flashes rapidly. So it looks like there is a connection, but because the app is still gray and says waiting, I can't actually test my app (because I can't tap on anything).

    I'm running iOS 11.0.3, Xcode 9.0.1, Unity 2017.2, and ARkit Unity plugin v1.0.10. I've built the UnityARKitRemote scene (with Development Build checked) and it successfully opens on my device with no build errors.

    Any ideas? What else can I provide to be helpful? Thanks so much!
     
  3. planetmatrix

    planetmatrix

    Joined:
    Dec 8, 2015
    Posts:
    38
    Not implemented as of yet :(
    https://forum.unity.com/threads/ark...nity-arkit-plugin.474385/page-26#post-3191551
     
  4. conigliocattivo

    conigliocattivo

    Joined:
    May 14, 2013
    Posts:
    10
    Add this function in your script:
    Code (csharp):
    1.  
    2. bool IsPointerOverUIObject()
    3. {
    4.    PointerEventData eventDataCurrentPosition = new PointerEventData(EventSystem.current);
    5.    eventDataCurrentPosition.position = new Vector2(Input.mousePosition.x, Input.mousePosition.y);
    6.    List<RaycastResult> results = new List<RaycastResult>();
    7.    EventSystem.current.RaycastAll(eventDataCurrentPosition, results);
    8.    return results.Count > 0;
    9. }
    10.  
    and then just check !IsPointerOverUIObject() in the function which handle the touch.

    Antonio
     
  5. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    How is everyone doing virtual buttons for non Vuforia AR apps?
     
  6. altunhans

    altunhans

    Joined:
    Feb 22, 2017
    Posts:
    2
    Hi!
    It works.
    Thank you so much:)
     
  7. XxLuckyPoker

    XxLuckyPoker

    Joined:
    Apr 9, 2017
    Posts:
    4
  8. mebalzer

    mebalzer

    Joined:
    Mar 19, 2015
    Posts:
    16
    This does not seem to be working with Unity 2017.3.Ob5 either in the editor 'Play' mode or when used in an app installed on a phone. Also, there is no reason this shader can't work on Android is there? Especially if you manually choose forward rendering on GL3? It would be great to be able to use it in both ARKit and Core AR.
     
  9. bluesky139

    bluesky139

    Joined:
    Aug 24, 2012
    Posts:
    8
    Hello, I got a problem with remote connection.

    First, I tried this plugin in an empty project, loaded UnityARKitScene and plus ARKitRemoteConnection prefab, it works.

    Then I imported this plugin into my working project, also loaded UnityARKitScene and plus ARKitRemoteConnection prefab, it doesn't work.

    IP is conneccted, when I press "Start Remote ARKit Session", not work. Errors are below:

    (Filename: C:\buildslave\unity\build\Runtime/Network/PlayerCommunicator/EditorConnection.cpp Line: 102)

    <i>Autoconnected Player</i> FileNotFoundException: Could not load file or assembly 'Assembly-CSharp-firstpass' or one of its dependencies. The system cannot find the file specified.
    at System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity, Boolean refonly) [0x00000] in <filename unknown>:0
    at System.AppDomain.Load (System.String assemblyString) [0x00000] in <filename unknown>:0
    at System.Reflection.Assembly.Load (System.String assemblyString) [0x00000] in <filename unknown>:0
    at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetDeserializationType (Int64 assemblyId, System.String className) [0x00000] in <filename unknown>:0
    at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadType (System.IO.BinaryReader reader, TypeTag code) [0x00000] in <filename unknown>:0
    at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadTypeMetadata (System.IO.BinaryReader reader, Boolean isRuntimeObject, Boolean hasTypeInfo) [0x00000] in <filename unknown>:0
    at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectInstance (System.IO.BinaryReader reader, Boolean isRuntimeObject, Boolean hasTypeInfo, Int64& objectId, System.Object& value, System.Runtime.Serialization.SerializationInfo& info) [0x00000] in <filename unknown>:0
    at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObject (BinaryElement element, System.IO.BinaryReader reader, Int64& objectId, System.Object& value, System.Runtime.Serialization.SerializationInfo& info) [0x00000] in <filename unknown>:0
    at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObject (BinaryElement element, System.IO.BinaryReader reader, Int64& objectId, System.Object& value, System.Runtime.Serialization.SerializationInfo& info) [0x00000] in <filename unknown>:0
    at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadNextObject (BinaryElement element, System.IO.BinaryReader reader) [0x00000] in <filename unknown>:0
    at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectGraph (BinaryElement elem, System.IO.BinaryReader reader, Boolean readHeaders, System.Object& result, System.Runtime.Remoting.Messaging.Header[]& headers) [0x00000] in <filename unknown>:0
    at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x00000] in <filename unknown>:0
    at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream) [0x00000] in <filename unknown>:0
    at Utils.ObjectSerializationExtension.Deserialize[T] (System.Byte[] byteArray) [0x00000] in <filename unknown>:0
    at UnityEngine.XR.iOS.ConnectToEditor.HandleEditorMessage (UnityEngine.Networking.PlayerConnection.MessageEventArgs mea) [0x00000] in <filename unknown>:0
    at UnityEngine.Events.UnityAction`1[T0].Invoke (.T0 arg0) [0x00000] in <filename unknown>:0
    at UnityEngine.Events.InvokableCall`1[T1].Invoke (.T1 args0) [0x00000] in <filename unknown>:0
    at UnityEngine.Events.UnityEvent`1[T0].Invoke (.T0 arg0) [0x00000] in <filename unknown>:0
    at UnityEngine.Networking.PlayerConnection.PlayerEditorConnectionEvents.InvokeMessageIdSubscribers (Guid messageId, System.Byte[] data, Int32 playerId) [0x00000] in <filename unknown>:0
    at UnityEngine.Networking.PlayerConnection.PlayerConnection.MessageCallbackInternal (IntPtr data, UInt64 size, UInt64 guid, System.String messageId) [0x00000] in <filename unknown>:0

    (Filename: currently not available on il2cpp Line: -1)
     
    GenieQuest and QuestionsBrown like this.
  10. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,085
  11. nickfourtimes

    nickfourtimes

    Joined:
    Oct 13, 2010
    Posts:
    219
    I mentioned it a week ago, so apologies for posting again, but I'm having real trouble with a rendertexture in AR. In standard it's fine -- Camera 2 renders to an RT, which is put on a television rendered by MainCamera. But in AR the only thing that shows up in the rendertexture/on the television are some ambient particles from the scene's background.

    I'd understand if, for instance, the ARKit plugin was disabling all non-Main cameras, for instance; but the fact that the TV still shows *some* parts of the scene is puzzling.
     
  12. jimmya

    jimmya

    Joined:
    Nov 15, 2016
    Posts:
    793
    Check your clear flags for both cameras. Also realize, the video background is rendered via commandbuffer, so add UnityARVideo to any camera you need to render the video.
     
  13. idorurei

    idorurei

    Joined:
    Sep 20, 2017
    Posts:
    7
    Hi all,

    Has anyone gotten a Canvas to work in camera space?

    I'm trying to allow for 3d objects/meshes on the canvas UI, but it won't properly scale with camera when I'm switching between the iphone/ipad in tall or wide orientation.

    Any tips would be appreciated
     
  14. duncanx

    duncanx

    Joined:
    Feb 12, 2011
    Posts:
    45
    Just to help others about ARKit Remote...and perhaps it's been covered already somewhere...but I didn't see it. Here's what happened to me...followed the instructions to the letter...but it never worked...always connect failed. Tried on different computers...windows...macs...different versions...5.6.x and 2017.1, 2, 3, etc.

    I read online that tons of people have this issue so I just assumed it was half baked and moved on...after a couple painful weeks of development (using ARKit without the remote is basically a non-starter)...I finally decided I have to solve this or just not make ARKit stuff. I figured it out...it's a pretty silly gotcha...but somewhat genuine.

    The gotcha in my case was that this was also the time I decided to try Cloud Build and Collab. Even I was marking my builds as "development" in the editor...and that change was picked up by Collab (change detected) and uploaded...during the cloud build it was not respected. When you setup Cloud Build in the editor, it does ask you for some settings, but not that setting so I assumed (and I still think it's the natural assumption) it would take those settings from the project. For example if I change other things in project settings, build settings, etc...except for the specific things asked for in the cloud build config...all of those things are reflected in my builds. Well...it just turns out that if you view your cloud build project on the unity website, there are 2 or 3 additional settings there that are not available to set in the editor...they override whatever is in your project...and one of them is development build....and it defaults to off (release build).

    tl;dr....if you are a windows user and therefore naturally drifted to using cloud build to make your ios stuff...when you build that remote go into cloud build settings on the website (not available in the editor) and set the release/development build override to the correct setting (dev buidl).
     
  15. EnclaveDev

    EnclaveDev

    Joined:
    Mar 27, 2014
    Posts:
    1
    On console log I see that my device is connected. But when I press Start it appears the following error:

    SerializationException: Field "displayTransform" not found in class Utils.serializableUnityARCamera
    System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadTypeMetadata (System.IO.BinaryReader reader, Boolean isRuntimeObject, Boolean hasTypeInfo) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs:691)

    Any ideas?
     
  16. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    Yes I was wondering this as well, with the iPhone X due for launch shortly.

    Reminds me of some of the Faceplus / Mixamo tech a few years ago that eventually got dropped.
     
    ina likes this.
  17. mrjman

    mrjman

    Joined:
    Jan 21, 2014
    Posts:
    4
    I am seeing the exact same thing when comparing the unity plugin to AR Dragon. Not only does the plane detection appear to be worse in unity but the actual anchor pinning/updating appear to move my placed objects much more than what AR Dragon does. I have tested in a variety of lighting conditions and AR Dragon for the most part is extremely solid and holds the object in place really well once placed. In contract when using the unity plugin it is not uncommon for my objects to move fairly drastically and sometimes they will "snap" back into place. I have also noticed a large amount of jitter with placed objects when using unity especially when getting closer to the pinned objects.

    Any help on the above issues would be great. Is it possible to stop receiving transform updates once an object is pinned? My environment is fairly static and I would rather the object holds its original anchor location instead of updating its transform based on arkit data. I have also tried turning off plane detection once I have a good plane as mentioned in the apple arkit guides, but this does not seem to help at all.
     
    hungrybelome likes this.
  18. DeepMotionPhysics

    DeepMotionPhysics

    Joined:
    Jul 31, 2014
    Posts:
    243
    ARKit Unity Plugin is a great tool except this plane detection problem that is the biggest bummer. I saw the similar problems as @mrjman and @arlevi09 with Unity ARKit Plugin. In a nutshell the plane detection of Unity ARKit Plugin (head of GIT with Unity 2017.2.x tested on iPhone 8+) works much less effective than native ARKIT app such AR Dragon or other demo project built with iOS SWIFT like this one:

    https://blog.markdaws.net/arkit-by-example-part-3-adding-geometry-and-physics-fun-8dd2b90037f2

    Here is a summary of the problems:
    • Plane detection is much slower than AR Dragon or the AR demo built with iOS SWIFT from the above source
    • Plane detection is in accurate: very fragmented, seemly wrong extent, often with wrong offsets (there is a gap between the plane detected and the table underlying the plane)
    • Plane merging is not happening: using the "arkit-by-example" source from the above to build a demo APP and point your camera to the ground you can see the plane fragments detected are quickly "merged" into a bigger unified plane in 10-30 seconds. With Unity ARKit plugin though it never happened
    It looks like some low level integration bugs with the ARKit SDK. Are we wrapping the latest and greatest version of ARKit SDK from Apple or maybe it's an older version that has less updated "plane detection" algorithm ?

    I'm wondering if anyone else using Unity ARKit plugin gets a decent plane detection closer to AR Dragon or the native ARKit-by-example demo above ? If so, there might be some configuration/build-setting/platform issues the unlucky ones were hit which is also good to know so we can tweak around

     
    Last edited: Oct 26, 2017
    hungrybelome likes this.
  19. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
    I didn't know that the native ARKit example scenes detect properly... bummer. It sounds like Unity's wrapper is solely to blame.

    The Unity ARKit plugin seems far from production ready at the moment, for the reasons @DeepMotionPhysics has outlined. @jimmya is the current performance difference between the Unity wrapper and native ARKit acknowledged by the team responsible for the wrapper? Can we expect improvements anytime soon?

    It's hard to imagine releasing a Unity ARKit app at the moment, given that the tracking is significantly worse than the current native ARKit apps. Users would not tolerate the spotty plane detection and tracking, after experiencing AR Dragon and the other native ARKit apps. Have any Untiy ARKit apps been published?

    @DeepMotionPhysics @mrjman I think we should make a thread on the Bitbucket page. Though I'm unfamiliar with Bitbucket, and it doesn't seem to have an "issues" page like Github does.
     
  20. jimmya

    jimmya

    Joined:
    Nov 15, 2016
    Posts:
    793
    AR Dragon is #madewithunity and uses #UnityARKitPlugin so there shouldn't be much of a difference.

    You do not need to place objects as children of the plane gameobjects if you don't want to (you can just place objects in world coordinates). You can also stop detecting planes after you've got the first one, or you can stop listening to plane update messages in your anchor manager.
     
    Last edited: Oct 27, 2017
    planetmatrix and hungrybelome like this.
  21. jimmya

    jimmya

    Joined:
    Nov 15, 2016
    Posts:
    793
    TopARKitAppsUnity.png

    As you can see a majority of the top ARKit apps on the AppStore are made with this plugin. I'm not sure what you are observing, but maybe it has to do with the how you are using the detected planes? There should be no difference in the performance or reliability of the plugin vs native ARKit - the plugin just funnels through the planes found by ARKit - the code is out there for you to examine.

    It's possible that some apps are using the planes just as a guide and not putting things directly on the GameObjects created from the ARKit planes. Another thing might be your version of XCode - if you don't have the latest, you will not have the latest ARKit SDK version either.
     
    Last edited: Oct 27, 2017
  22. jimmya

    jimmya

    Joined:
    Nov 15, 2016
    Posts:
    793
    Is this using the Unity plugin?
     
  23. DeepMotionPhysics

    DeepMotionPhysics

    Joined:
    Jul 31, 2014
    Posts:
    243
    @jimmya Thanks for sharing the information. It's reassuring to know that AR Dragon was made with Unity ARKit plugin. Very possibly it's some mis-configuration or dev environment settings somewhere. Or the actual way we spawn and maintain detected planes. Do we know if AR Dragon use ARKit autodetected planes or use point cloud to create custom planes that feel more responsive ? Let's see what we can find out.

     
  24. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
    Thanks for the heads up about AR Dragon being made with Unity!

    After going through the example scenes, I now realize that AR Dragon is probably just using
    ARHitTestResultType.ARHitTestResultTypeFeaturePoint to position their "gameboard", rather than relying on plane detection.

    Because my game is also using a "gameboard" approach, I have changed my code to only hit test feature points. The tracking/placing of my gameobject is now comparable to AR Dragon!

    Given how inconsistent plane detection was, I have disabled plane detection all together, which will hopefully improve performance as well. It seems like unless your game mechanics actually rely on proper plane detection, it is better just to hit test to the feature points and ignore planes (at least at the moment).

    Sorry for making a fuss—it is clear I was just misusing the SDK.
     
  25. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    When switching scenes (Main Menu to ARKit scene, back to Main Menu, then to new ARKit scene) the camera is frozen when loading the new ARKit scene. Any ideas why? Vuforia is also in the project but doesnt seem to be throwing any errors.
     
  26. mrjman

    mrjman

    Joined:
    Jan 21, 2014
    Posts:
    4
    @arlevi09 Great to hear you are seeing good results now! Can you speak a bit more about what you mean when you say gameboard approach and why feature point hit detection is works better? Also any more explanation would be great as well. I was using the basic hit detection script in the plugin that prioritizes plane hits so i'll switch that to feature only and see how it goes in my scenario.

    One of the things that is really confusing is when hit testing and placing objects based on the unity code I see nothing should be updating their world coordinates after the initial placement. However as I am moving around looking at the objects they tend to move and jitter (by quite a bit sometimes) and I do not see this with AR Dragon. Could this be happening because the plane they are attached to in arkit is being updated through the plane manager in unity?

    Also does anyone have an example or explanation of what you would use the user anchor component for? It seems like it just maps to a normal anchor in arkit and would allow for receiving updates in unity based on changes to that anchor. Just trying to figure out where this would be useful.

    and thanks @jimmya for the pointers and letting us know AR Dragon was built with unity.
     
  27. RichardPoole

    RichardPoole

    Joined:
    Oct 2, 2017
    Posts:
    1
    I'm hoping someone can help here.

    I've bastardised UnityARKitHitTestExample - and I have the following going on.

    I've amended UnityARCameraManager.cs so that I call RunWithConfigAndOptions:
    Code (CSharp):
    1.  
    2. m_session.RunWithConfigAndOptions(config, UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors | UnityARSessionRunOption.ARSessionRunOptionResetTracking);
    3.  
    I've amended UnityARHitTestExample.cs so that I call HitTestWithResultType on every frame, with point being the center of the screen:
    Code (CSharp):
    1.  
    2.         void Update() {
    3.             if (ApplicationManager.instance.readyToTrack && !isPlaced) {
    4.                 ARPoint point = new ARPoint {
    5.                     x = 0.5f,
    6.                     y = 0.5f
    7.                 };
    8.  
    9.                 // prioritize reults types
    10.                 ARHitTestResultType[] resultTypes = {
    11.                     //ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent,
    12.                     // if you want to use infinite planes use this:
    13.                     ARHitTestResultType.ARHitTestResultTypeExistingPlane,
    14.                     //ARHitTestResultType.ARHitTestResultTypeHorizontalPlane,
    15.                     //ARHitTestResultType.ARHitTestResultTypeFeaturePoint
    16.                 };
    17.          
    18.                 foreach (ARHitTestResultType resultType in resultTypes) {
    19.                     if (HitTestWithResultType (point, resultType)) {
    20.                         return;
    21.                     }
    22.                 }
    23.             }
    24.         }
    25.  
    I set ApplicationManager.instance.readyToTrack to be false initially, true in the Update() method of UnityARCameraManager, and I set it back to false when I navigate away from UnityARKitHitTestExample Scene:
    Code (CSharp):
    1.  
    2.     void Update () {
    3.      
    4.         if (m_camera != null)
    5.         {
    6.             // JUST WORKS!
    7.             Matrix4x4 matrix = m_session.GetCameraPose();
    8.             m_camera.transform.localPosition = UnityARMatrixOps.GetPosition(matrix);
    9.             m_camera.transform.localRotation = UnityARMatrixOps.GetRotation (matrix);
    10.  
    11.             m_camera.projectionMatrix = m_session.GetCameraProjection ();
    12.  
    13.             var arvideo = m_camera.gameObject.GetComponent<UnityARVideo> ();
    14.             Material mat = arvideo.m_ClearMaterial;
    15.  
    16.             ApplicationManager.instance.readyToTrack = true;
    17.         }
    18.  
    19.     }
    20.  
    What's happening is, first time I enter the scene everything works perfectly, then a navigate away (to a model select page) and back again, it seems it immediately detects the previous plane, and immediately places my object in the wrong place.

    What I would like is for the session to be completely reset everytime the user enters the Scene.

    Any thoughts?!
     
  28. patcosmos310

    patcosmos310

    Joined:
    Jan 30, 2015
    Posts:
    5
    Hi @jimmya and others
    I have question regarding UnityARkit plugin and Mapbox .I am trying to instantiate a game object at a specified geo location using Mapbox and Arkit plugin(here). I m using following code

    1. void PlaceObject(Mapbox.Utils.Vector2d loc)
    2. {
    3. Mapbox.Utils.Vector2d spawnLocation = new Mapbox.Utils.Vector2d(loc.x, loc.y);
    4. Vector3 _targetPosition = Conversions.GeoToWorldPosition(spawnLocation,
    5. positionWithLocationProvider._map.CenterMercator,
    6. positionWithLocationProvider._map.WorldRelativeScale).ToVector3xz();
    7. GameObject currObject = Instantiate(SpawnObject);
    8. Vector3 currentPosition = new Vector3(_targetPosition.x, 3, _targetPosition.z);
    9. currObject.transform.position = currentPosition;
    10. }
    It spawns at a completely different location.Should I be doing something else?Is this the right way ?
     
  29. Thirty9

    Thirty9

    Joined:
    Apr 6, 2015
    Posts:
    16
    Hello!
    I have a few questions about using UnityARUserAnchorComponent. Will adding this component to objects improve the AR tracking? What is this component mainly used for? And what am I supposed to do in the GameObjectAnchorUpdated function?

    Thanks!
     
  30. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Nope.
    It's a way to anchor a virtual object to a real world location relative to the origin of the ARKit session's origin. What this means? I don't know yet. But you can associate your game objects with anchors if you like. Maybe there will be a release in the future that makes this API more useful, I have no idea. For now it's basically a way to associate metadata with your game object
    Anchors can get updated if they are tracked. There is no indication that apple will be updating user anchors, but we added that functionality just in case it decides to. So the answer is again, i have no idea :). This API is very cryptic with almost no documentation, just like these answers.

    Hopefully they will update the API/Documentation at some point to give us a better idea of how to use this API.
    Cheers,
    Chris
     
  31. mrjman

    mrjman

    Joined:
    Jan 21, 2014
    Posts:
    4
    I have done several tests today to improve AR tracking and while it has improve a bit it is still not as good as is seen using AR Dragon.

    I tried hit testing only against feature points and turning off plane detection completely. This yielded slightly better tracking results but still fell short of AR Dragon tracking. The objects tended to drift over time and would occassionally "snap" back into place.

    I also tried using plane detection to get an initial plane that was satisfactory and then turned off plane detection and any further plane transform updates. This also yielded marginally better tracking results but the same drift problems were seen and when moving closer to the object noticeable jitter was observed. You could also see the same jitter in the blue outline that is drawn for the plane.

    I'm a bit at a loss here on how the AR Dragon app seems to keep its object grounded to the correct place (with just some slight movement) while my objects definitely have drift and will occasionally snap into location. It doesn't seem like this should happen, but any help would be appreciated. I'm not sure what would even be updating the world coordinates of the placed objects since everything that updates is turned off.
     
  32. BrinyBox

    BrinyBox

    Joined:
    Aug 2, 2017
    Posts:
    7
    Have you checked out our ARkit repo on github? It might be able to help out here.

    https://github.com/mapbox/mapbox-arkit-unity

    If you're still having some troubles after giving that a look feel free to reach out.
     
    jimmya likes this.
  33. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,490
    Hi folks, I'd like to ask a question, does the ARkit plugin support most android devices, or only some? If only some why is that e.g. due to CPU power?
     
  34. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
    When I said gameboard, I just meant that all the objects in my game exist under one root gameobject, so all my game needs is for that one root gameobject needs to be positioned correctly with the right orientation.

    I've been purposely testing on a surface that is quite difficult for AR/lightfields in general, an almost feature-less white tiled floor, so plane detection almost never occured. That's why switching to hit testing for the feature point cloud was so dramatic for me. I'm pretty sure AR Dragon is also hit testing for feature points (though probably not exclusively), given that you can place their base square on non-horizontal surfaces. And their hit detection performs comparably to my test app's on this difficult surface. Though maybe after using my app more I'll notice greater tracking instability and drifting in comparison to AR Dragon. But with my initial tests so far, I'm pretty happy with the tracking and have not noticed significant jitter or drifting when moving the camera around and waving my hand in front of it. And I am simply setting the position/rotation of my root gameobject, and not messing with any of the anchor APIs.

    Anyways, I keep jumping back and forth between ARKit and ARCore and admittedly have a weak understanding of both APIs. I'll keep experimenting and post if I find something helpful!
     
  35. glenrhodes

    glenrhodes

    Joined:
    Oct 25, 2013
    Posts:
    56
    What generally is the accepted best way to detect when ARKit has read, and understood the world. Basically, so we start with a message, "Move your device and look around to initialize ARKit", and what's the generally accepted way to know when it's good to remove that message, and that ARKit is "good to go".

    I've found my own solution - putting a script on the debug plane prefab that toggles a boolean in my game manager, but I'm wondering if there's a more elegant solution, or if indeed there's an API already built into ARKit. Can it be achieved with GetARTrackingQuality() ?

    Thanks!
     
  36. XxLuckyPoker

    XxLuckyPoker

    Joined:
    Apr 9, 2017
    Posts:
    4
    hi,
    yes.
     
    SkaZonic and jimmya like this.
  37. Mike-B

    Mike-B

    Joined:
    Nov 18, 2012
    Posts:
    13
    Hi
    thanks for this plugin!
    I read that it was possible to stop the camera background but I did not figure out how?
     
  38. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,085
    not sure why this question keeps getting ignored
     
    Grislymanor and AquaGhost like this.
  39. 4wall

    4wall

    Joined:
    Sep 16, 2014
    Posts:
    73
  40. danreut_unity

    danreut_unity

    Joined:
    Oct 30, 2017
    Posts:
    2
    Sorry everyone for post very basic question. But everything was working fine, but after update to iOS 11.0.3 when I am trying to use remote connect there is no generated planes or particles showing up. Not sure what is the main problem. I can see 3d object like cube.

    iPhone 8 Plus: iOS 11.0.3
    Unity 3d: 2017.2.0f3

    Please advise,
     
  41. danreut_unity

    danreut_unity

    Joined:
    Oct 30, 2017
    Posts:
    2
    Sorry guys it was resolve by restarting the phone!
     
  42. xzhang-kpf1324

    xzhang-kpf1324

    Joined:
    Jul 21, 2016
    Posts:
    5
    Hi, any solution yet? I'm having the same issue with my iPad (iOS 11.0.3 15A432) , Xcode 9.0.1(9A1004), Unity 2017.2.0f3.

    I built the UnityARKitRemote scene first with Development Build, things are running smoothly, and then I open the EditorTestScene from the same folder, open the built app from iPad. After I choose the "Connected Player" from the console, and click "Start Remote ARKit Session", camera is tracking, and I can see the tracking particles (yellow dots) in Unity Game view, but nothing on iPad side, still showing "waiting for editor connection" and screen flashes a bit. And of course, no input can be made via iPad.

    Any ideas why this happening? Thanks!
     
  43. stuartlangfield

    stuartlangfield

    Joined:
    Jul 21, 2017
    Posts:
    13
    Having a strange position/alignment issue.

    Continuing to build out an AR platformer test. It's 3D, but the movement is constrained to be left, right and jump, no z-space movement. I have several objects within a scene, plus a character with controllers that allow it to move left/right and jump. Often when placing the scene using hit test, the character ends up on a different rotational axis to the scene, so when I make him run or jump, he's moving diagonally instead of straight left or right.

    This still occurs even when I force the scene to face camera when hit testing.

    Anyone else experiencing similar issues?
     
  44. patcosmos310

    patcosmos310

    Joined:
    Jan 30, 2015
    Posts:
    5

    Thank you @BrinyBox for replying.Im using the same repo but there seems to be some problem instantiating the game object at a particular latitude, longitude.For some reason it shows up right behind the user rather than spawning at the location.I am also trying to refer SimpleAutomaticSynchronizationContext class.
    im not sure if Im doing the right thing.
     
    Last edited: Oct 31, 2017
  45. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
  46. 4wall

    4wall

    Joined:
    Sep 16, 2014
    Posts:
    73
    Just encountered the 'Everyplay' framework in a Tanks multiplayer demo. Can anyone tell me if this framework will work with ARkit?
     
  47. sd_trent

    sd_trent

    Joined:
    Jul 1, 2017
    Posts:
    37
    Hello everyone!

    My ARKit app had been reject by Apple three times because ARKit failed to load on iPad (2017). Apple sent me a screen shot of my app running on iPad and it just showed a black screen. Unfortunately, I don't have an iPad to test this on. However, I have tested it on iPhones SE, 6s, and 7+, they all worked fine. Does anyone know what could be going on? Is there some kind of setting I need to enable for it to run on iPad? I've looked everywhere and I can't find anything.

    Thanks.
     
  48. 4wall

    4wall

    Joined:
    Sep 16, 2014
    Posts:
    73
    Maybe Apple just wants you to purchase an iPad for testing:)
    I'm only aware of the extreme processor limitations of ARkit. Just found out only A9 and A10 family or processors are supported. Which means that for iPads only latest iPad Pros can use ARkit!

    Anyone with an iPad mini is out of luck it seems.

    Anyone know if there are any plans to provide support for A7 and A8 processors?
     
  49. ninjanosui

    ninjanosui

    Joined:
    Jul 12, 2013
    Posts:
    54
    Hi people,
    How would I use an infinite plane (from the first plane created) like in the Ikea place app? Where you can place objects meters away from yourself without scanning that area. The useExistingPlane seems no different than useExistingPlaneUsingExtent or am I missing something?

    Regards,
    Steven
     
  50. Thirty9

    Thirty9

    Joined:
    Apr 6, 2015
    Posts:
    16
    Thanks for your reply.
    An apple developer (Keith) told me that using ARPlaneAnchor can improve the tracking. Do you have any idea how I can leverage it in Unity? I was told the implementation in unity might be different.
     
Thread Status:
Not open for further replies.