Closed asus4 closed 3 years ago
As a workaround, please modify GetUndisposable
method in ARFace.cs
File path: Library/PackageCache/com.unity.xr.arfoundation@3.0.0-preview.4/Runtime/AR/ARFace.cs
Code:
unsafe NativeArray<T> GetUndisposable<T>(NativeArray<T> disposable) where T : struct
{
// Add these line
#if UNITY_EDITOR
return disposable;
#endif
if (!disposable.IsCreated)
return default(NativeArray<T>);
return NativeArrayUnsafeUtility.ConvertExistingDataToNativeArray<T>(
disposable.GetUnsafePtr(),
disposable.Length,
Allocator.None);
}
Added a patch to fix this issue
ARFace.GetUndisposable throws on UnityEditor, since NativeArray.cs checks read/write access on Editor
Error Message
refs https://github.com/Unity-Technologies/arfoundation-samples/issues/343