A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Handheld AR' started by tdmowrer, Aug 29, 2019.
Great! Thanks @tdmowrer I’ll look into it.
@tdmowrer I can confirm that having a button toggling focusmode works on iOS. However setting it at in the settings or setting it by script on Start() does not affect it at all. At what time should I set the focusMode to fixed for it to take effect?
Hard to say, since it looks like we're wading into undefined behavior territory. I would setup a coroutine to set the autofocus a few frames after the camera is enabled and experiment with the timing.
Yeah, that's pretty broken. It will be fixed in 3.0.0-preview.4
For now, you can work around this by giving the ARCamera a non-identity transform. Set its X position to be 0.001, for instance. This will trigger the correct code path. For this to work, make sure you're using the TrackedPoseDriver with the "Use Relative Transform" checkbox checked.
Is there an ETA on when ARFoundation will be completely out of the development/ preview phase, and will have full support for all the ARKit 3 features?
Verified (non-preview) packages are tied to specific Unity releases, so the next verified release will be 2020.1. The current ARFoundation 3.0.0-preview packages are the preview of this release.
Thank you very much for the heads up on this
Building a simple AR project for iOS under Windows 10, with the help of iOS Builder, fails because of AR Foundation 3.0.0 Preview 4:
My "solution": downgrading to last stable versions:
AR Foundation from 3.0.0 Preview 4 to 2.1.4
AR Subsystem from 3.0.0 Preview 4 to 2.1.1
AR Core from 3.0.0 Preview 4 to 2.1.2
AR Kit XR Plugin from 3.0.0 Preview 4 to 2.1.1
What version of Xcode? In ARFoundation 3.0, we can target either Xcode 10 or Xcode 11. We do this based on what you choose in the Build Settings. However, on Windows, you can't pick a version of Xcode (since it is not installed) so we always pick Xcode 11.
The errors you posted look like linker errors I would expect to get if building with Xcode 10 and linking against an Xcode 11 lib.
When using the latest preview packages and Unity 2019.2.10f1 and I try to run the ARKitFaceBlendShapes scene, I am greeted with an error pink shader on the entire screen. Did I go wrong somewhere?
This is what xcode spits out:
So this seems to be an issue (as expected) with the background shader. So when I check out the shader. I get the following:
The editor.log just repeats the same message (they're in more shaders, so might be something unrelated to ARFoundation)
Seems to be an issue with the shader compiler on Catalina: https://issuetracker.unity3d.com/issues/ios
Thanks for your reply. This makes totality sense to me. I think iOS Builder is using XCode10. Don't know if it sometimes support XCode11.
With ARfoundation's SimpleAR scene, the rotation of the Placed Prefab is zeroed out when the scene starts. And when you move the object onto a tracked plane, the object's rotation does not dynamically change to match the rotation of that plane. The rotation of the object remains frozen. I'm wanting to write a script where the Placed Prefab will match the rotation of the tracked plane it's resting on. Is there a way to do this?
How AR Foundation is connected to New XR Platform? There is not enough information at this moment on Unity YouTube. I found something on Oculus Connect, but there are no mentions about AR Foundation. Please clarify it.
just set the rotation of the placed object to hitPose.rotation;
I tried using addressables for updating ImageLibrary but it didn't work out of the box on android with ARFoundation. What aspects of addressables you'd like to engage with XR? Assets and scenes are easily loaded with addressables regardless of XR setup.
We're having problems building using BuildPipeline.BuildPlayer() with com.unity.xr.arkit-3.0.0-preview3 and com.unity.xr.arkit-3.0.0-preview4.
We get an error about the Xcode 10 and Xcode 11 variants of UnityARKit.a colliding.
Plugin 'UnityARKit.a' is used from several locations:
Packages/com.unity.xr.arkit/Runtime/iOS/Xcode1100/UnityARKit.a would be copied to <PluginPath>/UnityARKit.a
Packages/com.unity.xr.arkit/Runtime/iOS/Xcode1000/UnityARKit.a would be copied to <PluginPath>/UnityARKit.a
Please fix plugin settings and try again.
We've had a PreBuildProcessor script that tries to delete the Xcode 10 variant of the .a file from Library/PackageCache, which seems to work sometimes...
Note also that the paths the Editor is complaining about are in the (virtual) Package directory.
This is the pre-build step:
public class PreBuildProcessor: IPreprocessBuildWithReport
public int callbackOrder => 0;
public void OnPreprocessBuild(BuildReport report)
// Remove build-breaking Xcode 10 version of UnityARKit.a
File.Delete(Application.dataPath + "/../Library/PackageCacheemail@example.com/Runtime/iOS/Xcode1000/UnityARKit.a");
File.Delete(Application.dataPath + "/../Library/PackageCachefirstname.lastname@example.org/Runtime/iOS/Xcode1000/UnityARKit.a.meta");
// Hmmm. Our build logs say that Unity is attempting to access /Packages/com.unity.xr.arkit/Runtime/iOS/... so let's
// try that?
File.Delete(Application.dataPath + "/../Packages/com.unity.xr.arkit/Runtime/iOS/Xcode1000/UnityARKit.a");
File.Delete(Application.dataPath + "/../Packages/com.unity.xr.arkit/Runtime/iOS/Xcode1000/UnityARKit.a.meta");
However it doesn't work anymore...
I guess I'll have to fork the package and remove the file?
Has anyone seen anything similar?
OK. I was able to fix it by copying com.unity.xr.arkit-3.0.0-preview.4 into the Packages directory, and removing the offending Xcode 10 variant of the .a.
Thanks for your help, but I tried that, and unlike hitPose.pose, ARRaycastHit does not contain a definition for 'rotation'.
Did you try to implement this into the existing PlaceOnPlane script?
public class PlaceOnPlane : MonoBehaviour
public GameObject ground;
private GameObject _spawnedObject;
private static readonly List<ARRaycastHit> Hits = new List<ARRaycastHit>();
private ARRaycastManager _raycastManager;
private ARPlaneManager _planeManager;
private void Start()
_raycastManager = GetComponent<ARRaycastManager>();
_planeManager = GetComponent<ARPlaneManager>();
private void Update()
if (StatusTracker.GameStarted) return;
if (!TryGetTouchPosition(out var touchPosition)) return;
if (!_raycastManager.Raycast(touchPosition, Hits, TrackableType.PlaneWithinPolygon)) return;
if (Input.touches.Select(touch => touch.fingerId).Any(id => EventSystem.current.IsPointerOverGameObject(id))) return;
var hitPose = Hits.pose;
_spawnedObject = StatusTracker.SelectedRobot;
_spawnedObject.transform.position = hitPose.position;
_spawnedObject.transform.rotation = hitPose.rotation;
ground.transform.position = hitPose.position;
ground.transform.rotation = hitPose.rotation;
StatusTracker.ActiveRobots[StatusTracker.CurrentIndex] = _spawnedObject;
private static bool TryGetTouchPosition(out Vector2 touchPosition)
if (Input.touchCount > 0)
touchPosition = Input.GetTouch(0).position;
touchPosition = default;
This is from the current project (I don't instantiate objects, I pool them for performance).
@tdmourer We are working with an AR tool that loads images references and object references at runtime.
I saw that images now can be loaded for tracking at runtime. Good.
But what about object tracking? Can I add them at runtime?
If not, will it be added later?
Skybox Material missing in iOS build
loads images references at runtime worked,
But the tracking is not stable, even if I don't move, it will bounce back and forth.
Delete button incorrect in unity2019.3.0b10
Our game based on ARFoundation 3.0 preview 4 used to build just fine on Unity Cloud Build. However, very recently we started getting this error:
9058: ▸ ⚠;️ ld: Could not find auto-linked framework 'QuickLookThumbnailing'
9059: ▸ ❌; ld: symbol(s) not found for architecture arm64
9060: ▸ ❌; clang: error: linker command failed with exit code 1 (use -v to see invocation)
We're using Unity 2019.2.11 and XCode 10.2 on UCB. Did something change in XCode or UCB recently that caused this error to suddenly appear?
There's also a thread about it here:
However, after much googling I'm starting think the error is coming from ARFoundation, so that's why I'm asking here.
Thank you very much in advance for all help.
With body tracking, is it possible to track from just the waist up? Or does it need to detect the entire body to instantiate?
release notes on the new version?
When I start the ARCoreFaceRegions scene on the Sony Xperia XZ Premium, the permission is requested but afterwards the camera screen remains black. But on my Google Pixel 2 it works fine.
Sony Xperia XZ Premium
Can anyone confirm the problem?