using System; namespace UnityEditor.XR.ARSubsystems { /// /// Extensions to System.Guid /// public static class GuidExtensions { /// /// Decomposes a 16-byte Guid into two 8-byte ulongs. /// Recompose using UnityEngine.XR.ARSubsystems.GuidUtil.Compopse. /// /// The Guid being extended /// The lower 8 bytes of the guid. /// The upper 8 bytes of the guid. public static void Decompose(this Guid guid, out ulong low, out ulong high) { var bytes = guid.ToByteArray(); low = BitConverter.ToUInt64(bytes, 0); high = BitConverter.ToUInt64(bytes, 8); } } }