#if (UNITY_STANDALONE || UNITY_EDITOR) && UNITY_ENABLE_STEAM_CONTROLLER_SUPPORT
using System;
namespace UnityEngine.InputSystem.Steam
{
///
/// A handle for a Steam controller API object typed .
///
/// A type used to type the Steam handle. The type itself isn't used other than
/// for providing type safety to the Steam handle.
public struct SteamHandle : IEquatable>
{
private ulong m_Handle;
public SteamHandle(ulong handle)
{
m_Handle = handle;
}
public override string ToString()
{
return string.Format("Steam({0}): {1}", typeof(TObject).Name, m_Handle);
}
public bool Equals(SteamHandle other)
{
return m_Handle == other.m_Handle;
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj))
return false;
return obj is SteamHandle && Equals((SteamHandle)obj);
}
public override int GetHashCode()
{
return m_Handle.GetHashCode();
}
public static bool operator==(SteamHandle a, SteamHandle b)
{
return a.m_Handle == b.m_Handle;
}
public static bool operator!=(SteamHandle a, SteamHandle b)
{
return !(a == b);
}
public static explicit operator ulong(SteamHandle handle)
{
return handle.m_Handle;
}
}
}
#endif // (UNITY_STANDALONE || UNITY_EDITOR) && UNITY_ENABLE_STEAM_CONTROLLER_SUPPORT