using System; using System.Collections.Generic; using UnityEngine; using UnityEngine.Android; using static ENMenu; public class EN : MonoBehaviour { //[System.Serializable] //public class User //{ // public int id; // public string name; // public string job; // public GameObject character; //} public static EN instance; public List users = new List(); public User SelectedUser; public User Me; // Start is called once before the first execution of Update after the MonoBehaviour is created void Awake() { if(EN.instance) { Destroy(gameObject); return; } DontDestroyOnLoad(this.gameObject); instance = this; } public void Start() { if (!Permission.HasUserAuthorizedPermission(Permission.Microphone)) { Permission.RequestUserPermission(Permission.Microphone); } // StartCoroutine(webservice.instance. LoginRequest(OnLoginSuccess)); } public GameObject Error; public void showError(string title,string description) { CancelInvoke("hideError"); gameObject.transform .position= GameObject.FindGameObjectWithTag("anocher").transform.position; gameObject.transform .rotation= GameObject.FindGameObjectWithTag("anocher").transform.rotation; Error.SetActive(true); Error.transform.Find("error/title").GetComponentInChildren().text = title; Error.transform.Find("error/description").GetComponentInChildren().text = description; Invoke("hideError", 6); } public void hideError() { Error.SetActive(false); } // Update is called once per frame void Update() { } internal void Print(string j) { print(j); } }