1.4.1
Documentation for the Unity C# Library
Loading...
Searching...
No Matches
GetUserDisplay.cs
Go to the documentation of this file.
1
using
UnityEngine;
2
using
UnityEngine.UI;
3
using
PixoVR.Apex
;
4
public
class
GetUserDisplay
:
MonoBehaviour
5
{
6
public
Text
FirstName
;
7
public
Text
LastName
;
8
public
Text
Email
;
9
public
Text
UserId
;
10
public
Button
GetUserButton
;
11
12
// Start is called before the first frame update
13
void
Start
()
14
{
15
ApexSystem
.
Instance
.OnGetUserSuccess.AddListener(
OnGetUserSuccess
);
16
ApexSystem
.
Instance
.OnGetUserFailed.AddListener(
OnGetUserFailed
);
17
ApexSystem
.
Instance
.OnLoginSuccess.AddListener(
OnLoginSuccess
);
18
ApexSystem
.
Instance
.OnLoginFailed.AddListener(
OnLoginFailed
);
19
GetUserButton.interactable =
false
;
20
}
21
22
void
OnLoginSuccess
(
LoginResponseContent
loginResponse)
23
{
24
GetUserButton.interactable =
true
;
25
}
26
27
void
OnLoginFailed
(
FailureResponse
failedLoginResponse)
28
{
29
GetUserButton.interactable =
false
;
30
}
31
32
void
OnGetUserSuccess
(
GetUserResponseContent
getUserResponse)
33
{
34
FirstName.text = getUserResponse.
First
;
35
LastName.text = getUserResponse.
Last
;
36
Email.text = getUserResponse.
Email
;
37
UserId.text = getUserResponse.
ID
.ToString();
38
}
39
40
void
OnGetUserFailed
(
FailureResponse
failedGetUserResponse)
41
{
42
FirstName.text =
"N/A"
;
43
LastName.text =
"N/A"
;
44
Email.text =
"N/A"
;
45
UserId.text =
"N/A"
;
46
}
47
48
// Update is called once per frame
49
void
Update
()
50
{
51
52
}
53
}
GetUserDisplay
Definition
GetUserDisplay.cs:5
GetUserDisplay.OnLoginFailed
void OnLoginFailed(FailureResponse failedLoginResponse)
Definition
GetUserDisplay.cs:27
GetUserDisplay.UserId
Text UserId
Definition
GetUserDisplay.cs:9
GetUserDisplay.GetUserButton
Button GetUserButton
Definition
GetUserDisplay.cs:10
GetUserDisplay.OnLoginSuccess
void OnLoginSuccess(LoginResponseContent loginResponse)
Definition
GetUserDisplay.cs:22
GetUserDisplay.OnGetUserSuccess
void OnGetUserSuccess(GetUserResponseContent getUserResponse)
Definition
GetUserDisplay.cs:32
GetUserDisplay.OnGetUserFailed
void OnGetUserFailed(FailureResponse failedGetUserResponse)
Definition
GetUserDisplay.cs:40
GetUserDisplay.Start
void Start()
Definition
GetUserDisplay.cs:13
GetUserDisplay.FirstName
Text FirstName
Definition
GetUserDisplay.cs:6
GetUserDisplay.Email
Text Email
Definition
GetUserDisplay.cs:8
GetUserDisplay.Update
void Update()
Definition
GetUserDisplay.cs:49
GetUserDisplay.LastName
Text LastName
Definition
GetUserDisplay.cs:7
MonoBehaviour
PixoVR.Apex.ApexSingleton.Instance
static T Instance
Definition
ApexSingleton.cs:14
PixoVR.Apex.ApexSystem
Definition
ApexSystem.cs:23
PixoVR.Apex.FailureResponse
[Serializable]
Definition
ApexTypes.cs:28
PixoVR.Apex.GetUserResponseContent
[Serializable]
Definition
ApexTypes.cs:245
PixoVR.Apex.GetUserResponseContent.First
string First
Definition
ApexTypes.cs:247
PixoVR.Apex.GetUserResponseContent.Email
string Email
Definition
ApexTypes.cs:249
PixoVR.Apex.GetUserResponseContent.Last
string Last
Definition
ApexTypes.cs:248
PixoVR.Apex.GetUserResponseContent.ID
int ID
Definition
ApexTypes.cs:246
PixoVR.Apex.LoginResponseContent
[Serializable]
Definition
ApexTypes.cs:169
PixoVR.Apex
Definition
PixoAndroidUtils.cs:6
Samples
DemoApexReporter
GetUserDisplay.cs
Generated
Mon Sep 16 2024 19:27:34
by Doxygen version
1.10.0