Update
This commit is contained in:
14
Assets/Scripts/UI/ProfileController.cs
Normal file
14
Assets/Scripts/UI/ProfileController.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class ProfileController : MonoBehaviour
|
||||
{
|
||||
private void OnEnable()
|
||||
{
|
||||
var root = GetComponent<UIDocument>().rootVisualElement;
|
||||
root.Q<Button>("btn-close")?.RegisterCallback<ClickEvent>(ev => UIManager.Instance.ShowScreen("MainMenu"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user