Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

ARKit support for iOS via Unity-ARKit-Plugin

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

  1. paulkre

    paulkre

    Joined:
    Oct 2, 2016
    Posts:
    2
    I have exactly the same problem. Unfortunately the solution doesn't work for me. :(
     
  2. ryo0ka

    ryo0ka

    Joined:
    Sep 27, 2015
    Posts:
    34
    I'm having the same issue. The pullreq doesn't seem to have been merged. I will test merging them in my local tomorrow but if you have already done so, please let me know how it's gone :)
     
  3. ryo0ka

    ryo0ka

    Joined:
    Sep 27, 2015
    Posts:
    34
    I merged the pull req (https://bitbucket.org/Unity-Technol...support-opengl-es-2-as-the-rendering-api/diff) to the current official default branch in my local, and made sure that both ES2/3 work, but it lowered the FPS significantly. I'm using Unity 2017.1.1f1 and iOS11.1.

    This issue has been pointed out by someone in the page. It seems like an issue from iOS beta 6. The author doesn't seem to have worked on it.
    I tried to necro the thread but for some reason Bitbucket won't let me comment on the page even though I'm logged in. If you could try it I'd appreciate it :)
     
    Last edited: Oct 1, 2017
    petey likes this.
  4. mavisakal

    mavisakal

    Joined:
    Aug 26, 2017
    Posts:
    15
    lingoded likes this.
  5. HaimBendanan

    HaimBendanan

    Joined:
    May 10, 2016
    Posts:
    28
    Just want to thanks all the prople involved in creating this plugin. I am working on Unity on my free time and I would never have taken the time to learn native ios development for the arKit. Thanks to this plugin, I started working on my app right away and everything is great.
    So again - thanks everyone you did a great job :)

    Here is my app:
    https://itunes.apple.com/us/app/vixeo-ar-movie-maker/id1281742220?ls=1&mt=8

     
    Gametyme and jimmya like this.
  6. MSFX

    MSFX

    Joined:
    Sep 3, 2009
    Posts:
    115
  7. MrXLR8

    MrXLR8

    Joined:
    Sep 22, 2017
    Posts:
    3
    So anyone have any success with scaling? Because 1x1x1 for 1 meter in real world is too small for me. I wish 100x100x100 can be like on 1 meter? Maybe anyone can show me example project? I read this post, I tried solution with UnityARMatrix and it messes with Plane Anchor and yellow points, also someone mentioned about double camera, but I don't know how to realize this. Any help?
     
  8. mm_sto

    mm_sto

    Joined:
    Aug 28, 2017
    Posts:
    16
    A spontaneous thought! Why not just put everything in a parent GO with 0.01 ? wouldn't that kinda give you the result? Also why do you need it to be different?
     
  9. Ghus86

    Ghus86

    Joined:
    Oct 24, 2013
    Posts:
    15
    Hi All

    Wanted to check if someone can me point in the right direction.

    I want to make a toggle a button on the PointClouldParticleSystem, so I can enable/disable it when I want

    I was able to Stop using the function with the same name provided by unity particle system
    but I having trouble deleting all the particles that are already on the scene.

    Thanks in advance
     
  10. Mobgen-Lab

    Mobgen-Lab

    Joined:
    May 23, 2017
    Posts:
    15
    If I want to pause ,reset and remove existing anchors... What should I do?
    call these methods, in this order?

    m_session.RunWithConfigAndOptions(config, UnityARSessionRunOption.ARSessionRunOptionResetTracking);
    m_session.RunWithConfigAndOptions(config, UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors);
    m_session.Pause();

    and then to Run again the session

    m.session.RunWithConfig(config);


    ??????

    tx
     
  11. MrXLR8

    MrXLR8

    Joined:
    Sep 22, 2017
    Posts:
    3
    I can`t scale terrain that way, any ideas?
     
  12. tonimarquez84

    tonimarquez84

    Joined:
    Feb 23, 2015
    Posts:
    17
    Hi! my app is working perfectly when i build and run, but if i try to do it across Unity Remote, i only can see a green screen, anybody knows how can i fix it? I tried Remote with other stuff i made and works correctly, only with ARKit fails...
     
  13. vvvbandi

    vvvbandi

    Joined:
    Oct 4, 2017
    Posts:
    1
    Hello,

    At Unite, there was a mention of a cross-platform AR solution. As I am currently in the super involved and tedious process of creating an ARKit course for Pluralsight, I'm very much interested in how this affects the Unity ARKit Plugin. I looked at the information available online, but I couldn't find more than a few sentences here and there. Can you shred some more light on what to expect?

    Thank you,
    András Velvárt
    velvart.andras (at) response.hu
     
  14. CyborgGames

    CyborgGames

    Joined:
    Mar 2, 2017
    Posts:
    4
  15. Nayko

    Nayko

    Joined:
    Mar 9, 2017
    Posts:
    4
    Hi,

    i'm having an issue using ARKit with Unity 5.6.2f1 and XCode 9 Beta 3. I get these errors when building a fresh project with ARKit plugin (didn't have problems with previous updates).

    ARKit framework seems to be in the right place in XCode. Looks like these errors are indicating a mismatch between different updates (Some errors have a "fix" option that change their name/signatures)

    EDIT: I believe it's because I'm using XCode 9.0 and it's not the latest release, currently downloading the 5GB from XCode 9.1

    EDIT2: Looks like the Unity ARKit plugin ships with an older version of ARKit, but the code from Unity example is using the updated ARKit framework
     

    Attached Files:

    Last edited: Oct 5, 2017
  16. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    556
    You can check out the scaled content example on bit bucket. It’s in a branch named scaled-content-test
     
  17. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    556
    Update everthing to the latest. Something is out of sync. Xcode 9 has been officially released. Please don’t use beta software and make sure everything is the most recent. You cannot rely with mixing versions of tools and software when things are changing so quickly.
     
  18. flyingdeutschman

    flyingdeutschman

    Joined:
    Jul 26, 2013
    Posts:
    8
    christophergoy likes this.
  19. Nayko

    Nayko

    Joined:
    Mar 9, 2017
    Posts:
    4
    Alright, thank you :)
     
  20. MSFX

    MSFX

    Joined:
    Sep 3, 2009
    Posts:
    115
    FYI this now no longer compiles in Unity 5.6.3, line 28, UnityARVideo.cs, Matrix4x4 constructor doesn't take 4 params.
     
  21. bharath989

    bharath989

    Joined:
    Dec 1, 2016
    Posts:
    3
    Can anyone tell me how to use the GetARTrackingQuality..I am not able to use it as it is saying it is obsolete.

    @christophergoy
     
    Last edited: Oct 6, 2017
  22. lingoded

    lingoded

    Joined:
    Aug 22, 2015
    Posts:
    8
    Waiting for this too. Core ML would enable us Unity developers to start creating Mixed Reality experiences :)
     
  23. QuestionsBrown

    QuestionsBrown

    Joined:
    Aug 14, 2017
    Posts:
    5
    ADD PLAYMAKER SUPPORT!
     
  24. QuestionsBrown

    QuestionsBrown

    Joined:
    Aug 14, 2017
    Posts:
    5
    Lol but honestly I'm having trouble hiding my ar level in the background while I have a title screen up or a menu screen. Any Ideas that could help would be lovely
     
  25. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    There's a PR with a fix for 5.x - will take it, but in the meantime you can use the changes it proposes.
     
  26. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    To achieve what you want, its as simple as one statement:
    m_session.RunWithConfigAndOptions(config, UnityARSessionRunOption.ARSessionRunOptionResetTracking | UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors);

    You don't need the pause, as doing the Run again resets. Of course you will also have to remove the corresponding GameObjects that have been created for the anchors if you have any.
     
  27. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
  28. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    Read the message in the Obsolete warning: [Obsolete("Hook ARFrameUpdatedEvent instead and get UnityARCamera.trackingState")]
     
  29. MSFX

    MSFX

    Joined:
    Sep 3, 2009
    Posts:
    115
    hey @christophergoy @jimmya

    Thanks for all your support so far!! I'm wanting to create an effect where I invert what is essentially an occlusion mask but I'm confused about how best to approach this with the ARKit feed...

    Imagine a cube, in the middle of the scene, obviously rendered in front of the ARKit feed. The cube is my mask on a "Mask" layer with a second child camera rendering just that layer and the ARKit camera culling the layer. Now I want to invert this so that the ARKit feed only renders on the mask (i.e. the cube)... I'm struggling to get my head around it due to the ARKit feed being in a render texture etc... any idea how to approach? Thanks!
     
  30. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    Update: latest on Bitbucket should work with Unity 5.6.2+
     
  31. macdeng

    macdeng

    Joined:
    Mar 30, 2014
    Posts:
    2
    Hello, What's the corresponding iOS and Xcode version of latest update on Bitbucket.
     
  32. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    You should be using latest versions of everything - iOS 11.x and XCode 9.x
     
  33. mm_sto

    mm_sto

    Joined:
    Aug 28, 2017
    Posts:
    16
  34. lifire

    lifire

    Joined:
    Jun 3, 2013
    Posts:
    2
    When will AR Interface (announced at Unite Austin) be available? Will it be posted to bitbucket or github? Thank you!
     
  35. kspilot

    kspilot

    Joined:
    Feb 23, 2017
    Posts:
    2
    Taking a screenshot in application using

    `ScreenCapture.CaptureScreenshot ("screenshot.png", 2);`

    Results in the AR YUV background being rendered as completely black with other GameObjects rendering correctly (floating in black space).

    Have others encountered this issue?
    Is there a known workaround?
     
  36. smallbit

    smallbit

    Joined:
    Oct 3, 2013
    Posts:
    55
    What is the situation with scaled content feature now ? is it branch scaled content test or alt scaled content? Are you guys planning to merge it to main at some point?

    EDIT:I used the second one and it seems to work fine.
    EDIT2: although its a bit weird working with things like raycast and such.
     
    Last edited: Oct 11, 2017
    Burglecut likes this.
  37. macdeng

    macdeng

    Joined:
    Mar 30, 2014
    Posts:
    2
    Thanks!
     
  38. prabhusam

    prabhusam

    Joined:
    Aug 3, 2017
    Posts:
    6
    I want put my ARKit app in Appstore but build error is given below

    iTunes Store Operation Failed This bundle is invalid. The key UIRequiredDeviceCapabilities contains value 'ARKit' which is incompatible with the MinimumOSVersion value of '11.0'.

    pls help me
     
  39. UCS

    UCS

    Joined:
    Nov 7, 2014
    Posts:
    4
    Hello,
    I ran into a possible bug working with ARKit.

    My application crashes due to a null reference in UnityARAnchorManager. It seems that the planeAnchorMap is null (This information was found when debugging through Xcode).
    This problem occurs when I restarted my session with a RunWithConfigAndOptions, to reset tracking and remove anchors, and then while it is initializing this session, I start another session with the same config. When it is done initializing and finds a plane and should be added to the planeAnchorMap it is null.

    I will, in my application, ensure that it is not possible to start a new config while initializing. But I did want to mention this.

    Best regards
    Bo
     
  40. TijsVdV

    TijsVdV

    Joined:
    Mar 7, 2017
    Posts:
    15
    So we are having a strange issue where objects placed under the ar camera in editor are not positioned the same when running on ipad/iphone. Is this normal? Seems to be like a fov issue.
     
  41. CManzione

    CManzione

    Joined:
    May 11, 2015
    Posts:
    7
    How can we update ARkit plugin without it breaking all of the project settings?

    Everytime I update it wipes my build settings clean along with icons and name of bundle id?
     
  42. YohanB

    YohanB

    Joined:
    Jun 9, 2015
    Posts:
    9
    If you share your project I might be able to help
     
  43. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    The right way to do this is to keep everything that creates and manages ARKit related GameObjects under a "DontDestroyOnLoad" root. ARSession does not stop - restarting it with different config just restarts the same session. You can pause it if you don't need it for a while.
     
  44. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    IPads and iPhones have different aspect ratios, and so do their cameras, so this expected. Mobile developers sometime cater to this by changing their UI or the distance from the camera for the content or content scale.
     
  45. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    If you are importing the plugin, uncheck ProjectSettings.asset. If you are copying files over, save your ProjectSettings.asset and overwrite plugin's version after copying. Compare your ProjectSettings with the one provided by the plugin though, because there are certain things in there that are needed to make examples work.
     
  46. GenieQuest

    GenieQuest

    Joined:
    Oct 21, 2014
    Posts:
    9
    We are building an app that only partially depends upon ARKit. We would like to support devices that are either on an older iOS version, or that don't support ARKit. However, it appears that the "IsSupported" functionality has been placed on the ARKitWorldTrackingSessionConfiguration, which one can only get a handle on through the UnityARSessionNativeInterface. if you call UnityARSessionNativeInterface.GetARSessionNativeInterface() on an unsupported device, the app crashes. Would it be possible to provide a method further up the stack that one could check and disable ARKit functionality in the app on devices where it isn't available? Maybe a static method on UnityARSessionNativeInterface itself?
     
  47. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    556
    You can instantiate a Configuration without getting the native interface and call that directly on the instance you created. Though, it should probably be a static method on that class.
     
  48. GenieQuest

    GenieQuest

    Joined:
    Oct 21, 2014
    Posts:
    9
    Thanks - we'll give that a try.
     
  49. Dennis_eA

    Dennis_eA

    Joined:
    Jan 17, 2011
    Posts:
    251
    Those are fake. I took a model from a Beffio Asset (search Car Paint Pro on the Asset Store)
     
  50. mathewsbabu

    mathewsbabu

    Joined:
    Sep 30, 2014
    Posts:
    32
    Hi,
    AR remote connection was working fine with previous version of the plugin.But with the new version it fails to connect to player.
    Anyone experiencing the same
     
unityunity