using UnityEngine; using UnityEngine.UI; using Ashwild.Network; namespace Ashwild.UI { /// /// Drop-in button for the in-game pause menu: opens the Steam overlay friends list so the /// player can invite a friend to the current session. Resolves the SteamInviteService lazily /// at click time so it works regardless of scene/singleton initialization order. /// [DisallowMultipleComponent] [RequireComponent(typeof(Button))] public class InviteFriendButton : MonoBehaviour { #region Serialized Fields [Header("References")] [Tooltip("The button that opens the Steam invite overlay. Auto-found if left empty.")] [SerializeField] private Button button; #endregion #region Unity Lifecycle /// /// Wires the click handler. /// private void Awake() { if (button == null) button = GetComponent