This repository has been archived on 2025-04-28. You can view files and clone it, but cannot push or open issues or pull requests.
ARPlusSystem/ARPlusSystem-250418/Library/PackageCache/com.unity.xr.arcore@4.2.10/Runtime/NativeObject.cs

26 lines
588 B
C#

using System;
namespace UnityEngine.XR.ARCore
{
static class NativeObject
{
public static bool ArePointersEqual(IntPtr? lhs, IntPtr? rhs)
{
// Both non null; compare pointers
if (lhs.HasValue && rhs.HasValue)
return lhs.Value == rhs.Value;
// rhs is null
if (lhs.HasValue)
return lhs.Value == IntPtr.Zero;
// lhs is null
if (rhs.HasValue)
return rhs.Value == IntPtr.Zero;
// both null
return true;
}
}
}