Skip to content

Commit

Permalink
update quick start code.
Browse files Browse the repository at this point in the history
  • Loading branch information
dujiepeng committed Jul 7, 2022
1 parent 3e77356 commit 4cec0fd
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions Chat-Unity/chat_unity_quickstart/Assets/Scripts/TestCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,36 +81,16 @@ private void SignInAction()
AddLogToLogText("username or password is null");
return;
}
StartCoroutine(FetchAgoraToken(Username.text, Password.text,
(agornToken) => {
AddLogToLogText(agornToken);
},
(error) => {
AddLogToLogText(error);
}
));
}

// Click SignUp button
// Click SignUp button
private void SignUpAction()
{
if (Username.text.Length == 0 || Password.text.Length == 0)
{
AddLogToLogText("username or password is null");
return;
}

StartCoroutine(RegisterAgoraAccount(Username.text, Password.text, (error) =>
{
if (error != null)
{
AddLogToLogText(error);
}
else
{
AddLogToLogText("register succeed");
}
}));
}

// Click SignOut button
Expand Down

0 comments on commit 4cec0fd

Please sign in to comment.