Files
2026-05-04 22:36:24 +03:00

22 lines
517 B
C#

using System;
using Code.GameplayServices;
using TMPro;
using UnityEngine;
namespace Code.UI
{
public class PlayerNameSetter : MonoBehaviour
{
[SerializeField] private TMP_InputField playerNameInput;
private void Awake()
{
playerNameInput.onSubmit.AddListener(PlayerScoreService.Instance.SetPlayerName);
}
private void OnDestroy()
{
playerNameInput.onSubmit.RemoveListener(PlayerScoreService.Instance.SetPlayerName);
}
}
}