mirror of
https://github.com/RaindropViewer/RaindropViewer.git
synced 2026-07-27 22:11:39 +00:00
23 lines
486 B
C#
23 lines
486 B
C#
using Plugins.CommonDependencies;
|
|
using Raindrop;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
[RequireComponent(typeof(Button))]
|
|
public class LogoutButton : MonoBehaviour
|
|
{
|
|
//get own references.
|
|
void Awake()
|
|
{
|
|
Button btn = this.GetComponent<Button>();
|
|
btn.onClick.AddListener(Logout);
|
|
}
|
|
|
|
private void Logout()
|
|
{
|
|
Debug.Log("logout requested by user UI");
|
|
ServiceLocator.Instance.Get<RaindropInstance>().Netcom.Logout();
|
|
}
|
|
|
|
}
|