Documentation for the Unity C# Library
Loading...
Searching...
No Matches
LoggedInUserDisplay.cs
Go to the documentation of this file.
1using UnityEngine;
2using UnityEngine.UI;
3using PixoVR.Apex;
4
6{
7 public Text FirstName;
8 public Text LastName;
9 public Text Email;
10 public Text UserId;
11 public Text OrgName;
12 public Text OrgId;
14
15 // Start is called before the first frame update
16 void Start()
17 {
18 ApexSystem.Instance.OnLoginSuccess.AddListener(OnLoginSuccess);
19 ApexSystem.Instance.OnLoginFailed.AddListener(OnLoginFailed);
20 }
21
23 {
24 FirstName.text = "N/A";
25 LastName.text = "N/A";
26 Email.text = "N/A";
27 UserId.text = "N/A";
28 OrgName.text = "N/A";
29 OrgId.text = "N/A";
30 MinimumPassingScore.text = "N/A";
31 }
32
34 {
35 FirstName.text = loginResponse.First;
36 LastName.text = loginResponse.Last;
37 Email.text = loginResponse.Email;
38 UserId.text = loginResponse.ID.ToString();
39 OrgName.text = loginResponse.Org.Name;
40 OrgId.text = loginResponse.Org.ID.ToString();
41 MinimumPassingScore.text = loginResponse.MinimumPassingScore.ToString();
42 }
43
44 // Update is called once per frame
45 void Update()
46 {
47
48 }
49}
void OnLoginFailed(FailureResponse response)
void OnLoginSuccess(LoginResponseContent loginResponse)