Many of you have asked about ARKit 2.0. Apple announced it and released Beta today. We’re right there with them - for example the Lego app that was shown at the keynote uses the version of the plugin that we’re releasing to all developers today.
I’m running into an issue when trying to use Image Anchors with this new ArKit2.0 plugin. I had it working in ArKit 1.5. I’m getting these errors when running on device via XCode 10 Beta.
The error claims the defined images either are not 100px big, or do not have a physical size defined. Image anchors do indeed meet the mentioned requirements of pixel size and physical size set in the project.
2018-06-05 16:02:46.094761-0700 arkitscene[866:87857] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2018-06-05 16:02:46.094971-0700 arkitscene[866:87857] [MC] Reading from public effective user settings.
2018-06-05 16:02:46.102191-0700 arkitscene[866:87857] [framework] -[CUINamedRecognitionGroup initWithName:contentsFromCatalog:usingRenditionKey:fromTheme:] couldn't find object named 'unitywhiteonblack' skipping
2018-06-05 16:02:46.102563-0700 arkitscene[866:87857] [framework] -[CUINamedRecognitionGroup initWithName:contentsFromCatalog:usingRenditionKey:fromTheme:] couldn't find object named 'unitylogoreferenceimage' skipping
2018-06-05 16:02:46.449096-0700 arkitscene[866:88078] [Technique] Could not add planar object for detection: <ARReferenceImage: 0x2808a3930 name="unitylogoreferenceimage" physical-size=(0.000, 0.000)> Reason: 4
2018-06-05 16:02:46.449131-0700 arkitscene[866:88078] [Technique] Could not add planar object for detection: <ARReferenceImage: 0x2808af750 name="unitywhiteonblack" physical-size=(0.000, 0.000)> Reason: 4
2018-06-05 16:02:46.449314-0700 arkitscene[866:88078] [Session] Session (0x1059caad0): did fail with error: Error Domain=com.apple.arkit.error Code=300 "Invalid reference image." UserInfo={NSLocalizedFailureReason=One or more reference images have an invalid size: unitylogoreferenceimage, unitywhiteonblack, NSLocalizedRecoverySuggestion=Make sure that all reference images are greater than 100 pixels and have a positive physical size in meters., ARErrorItems=(
unitylogoreferenceimage,
unitywhiteonblack
), NSLocalizedDescription=Invalid reference image.}
2018-06-05 16:02:47.713616-0700 arkitscene[866:87857] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
2018-06-05 16:02:47.714408-0700 arkitscene[866:87857] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
2018-06-05 16:02:57.480662-0700 arkitscene[866:87989] [BoringSSL] Function boringssl_session_errorlog: line 238 BoringSSL [C2.1:2] [0x105acf760] [boringssl_session_read] SSL_ERROR_ZERO_RETURN(6): operation failed because the connection was cleanly shut down with a close_notify alert
2018-06-05 16:02:57.481573-0700 arkitscene[866:87989] [BoringSSL] Function boringssl_session_errorlog: line 238 BoringSSL [C2.1:2] [0x105acf760] [boringssl_session_read] SSL_ERROR_ZERO_RETURN(6): operation failed because the connection was cleanly shut down with a close_notify alert
EDIT: This also happens when I publish the provided UnityARImageAnchor scene straight from the project as it is downloaded without any modifications on my end.
EDIT 2: Confirmed this happens in the same version of Unity the downloaded package was created with (2017.4.4f1)
FINAL EDIT: When removing all image anchors from the Resource set, I finally can get camera feed and the testing cube gameobject. Seems to be some problem in the way its creating those assets on build in Xcode?
Had custom written something that sets reflection probes based off the camera feed, however the new ARKit 2.0 version of custom location based reflections works much smoother - thankyou very much!
BUG Report: I made a quick ARKit 2.0 app yesterday in Unity 2018.1.3f1 - When tried to compile in Xcode 10 beta, I had errors relating to my signing certificate and provisioning profile. I tried a bunch of times with out success (used multiple pre-existing profiles that I know work too). In the end, I rebuilt the project in Unity Unity 2017.4.2f2 and that build worked with Xcode 10 beta. ¯_(ツ)_/¯
I’ll likely step back one version from 2018.1.3f1 for a test build; I was just in a rush yesterday.
I am compiling the ARkit 2.0 examples with Unity 2018.1.3f1 and XCode 10, and all apps are crashing upon launch. I changed deployment target to 12, and that didn’t work.
Could this be a Unity version issue? What’s the latest version of Unity that I can use that is compatible with ARkit 2.0?
I had issues with Unity 2018.1.3f1 too. I suspect it’s a Unity bug. rob_ice mentioned it works with 2018.1.0f2. I suspect there will be a fix in 2018.1.3f2 (or whatever is next).
@jimmya is persistent ar possible with v2.0? I would like to save placed objects and surrounding features in a file and it can be loaded for future sessions.
So far I’ve been able to get only horizontal and vertical planes from UnityARWorldMap scene.
Yes you can do it. For all the virtual objects, you would save their positions and rotations in your current coordinate system along with the ARWorldMap (possibly in a json file that describes the prefabs they use and their position and rotation). Then after you have relocalized with the ARWorldMap, just instantiate and position the virtual objects as before, and they will be in the right places.
is there any tutorial on how to create my own object as .arobject in object detection example scene. i tried using object scanner scene. but i don’t know how to achieve it. thanks in advance:)
Thanks @jimmya , that’s the one way to do it.
But worldmap documentation says Anchored objects(feature points or virtual contents) are also saved. so does the current version expose a way to do that? and what is the way to add an anchor to instantiated object?