本演示项目在Unity for Android Build中启用部分华为HMS和AGC服务,对应的类和函数的名称和用法相同。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

55 行
1.7 KiB

using UnityEngine;
using System.Collections.Generic;
using HuaweiService;
namespace HuaweiService.Auth
{
public class AGConnectAuth_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.auth.AGConnectAuth";
}
public class AGConnectAuth :HmsClass<AGConnectAuth_Data>
{
public AGConnectAuth (): base() { }
public static AGConnectAuth getInstance() {
return CallStatic<AGConnectAuth>("getInstance");
}
public Task signIn(AGConnectAuthCredential arg0) {
return Call<Task>("signIn", arg0);
}
public Task signInAnonymously() {
return Call<Task>("signInAnonymously");
}
public void deleteUser() {
Call("deleteUser");
}
public void signOut() {
Call("signOut");
}
public AGConnectUser getCurrentUser() {
return Call<AGConnectUser>("getCurrentUser");
}
public void addTokenListener(OnTokenListener arg0) {
Call("addTokenListener", arg0);
}
public void removeTokenListener(OnTokenListener arg0) {
Call("removeTokenListener", arg0);
}
public Task createUser(EmailUser arg0) {
return Call<Task>("createUser", arg0);
}
public Task createUser(PhoneUser arg0) {
return Call<Task>("createUser", arg0);
}
public Task resetPassword(string arg0, string arg1, string arg2)
{
return Call<Task>("resetPassword", arg0, arg1, arg2);
}
public Task resetPassword(string arg0, string arg1, string arg2, string arg3)
{
return Call<Task>("resetPassword", arg0, arg1, arg2, arg3);
}
}
}