Closed Lchikar closed 3 years ago
A fix is coming soon. The correct fix is to add an atomic safety handle when safety checks are enabled (by default, they are enabled in the Editor, but not the Player, which is why you only see this in the Editor). ARFace's GetUndisposable
method should look like this:
static unsafe NativeArray<T> GetUndisposable<T>(NativeArray<T> disposable) where T : struct
{
if (!disposable.IsCreated)
return default;
var undisposable = NativeArrayUnsafeUtility.ConvertExistingDataToNativeArray<T>(
disposable.GetUnsafePtr(),
disposable.Length,
Allocator.None);
#if ENABLE_UNITY_COLLECTIONS_CHECKS
NativeArrayUnsafeUtility.SetAtomicSafetyHandle(
ref undisposable,
NativeArrayUnsafeUtility.GetAtomicSafetyHandle(disposable));
#endif
return undisposable;
}
Thank you for your response, I will try that. Do you know how long until this next fix, maybe ?
I can't be more specific than "soon", unfortunately, but it is our intention to release it as soon as possible.
This should now be released in 4.2.0-pre.12.
Hello @tdmowrer,
I have dealt with the exact same issue as @asus4 lately while working on an ARFoundation simulation tool as well. I managed to solve it temporarily with what @asus4 shared in his thread.
Are there any updates about this issue today ?
Environment : Unity Editor 2019.4.24f1 ARFoundation 4.1.7 ARKit 4.1.7 ARCore 4.1.7