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