Gamecirclesocial'没有实现接口成员 [英] Gamecirclesocial' does not implement interface member
本文介绍了Gamecirclesocial'没有实现接口成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
;
使用UnityEngine.SocialPlatforms;
使用System.Collections.Generic;
公共类AGSSocialLocalUser:AGSSocialUser,ILocalUser {
public static AGSPlayer player = AGSPlayer.GetBlankPlayer();
public static List< AGSSocialUser> friendList = new List< AGSSocialUser> ();
#region ILocalUser实现
public void Authenticate(System.Action< bool> callback){
GameCircleSocial.Instance.RequestLocalPlayer(callback);
Social.Active.Authenticate(this,callback);
}
public void LoadFriends(System.Action< bool> callback){
GameCircleSocial.Instance.RequestFriends(callback);
}
public IUserProfile [] friends {
get {
return friendList.ToArray();
}
}
public bool authenticated {
get {
return AGSPlayerClient.IsSignedIn();
}
}
公共布尔未成年人{
得到{
AGSClient.LogGameCircleError(ILocalUser.underage.get不可用于GameCircle);
返回false;
}
}
#endregion
}
我尝试了什么:
请告诉我如何解决这个错误。
解决方案
< blockquote>基于 ILocalUser的Unity文档 [ ^ ],认证
有两个签名:一个带有 Action< bool>
参数(你有),另一个带 Action< bool,string>
参数,你没有。同样实现那个。
using UnityEngine; using UnityEngine.SocialPlatforms; using System.Collections.Generic; public class AGSSocialLocalUser : AGSSocialUser, ILocalUser { public static AGSPlayer player = AGSPlayer.GetBlankPlayer(); public static List<AGSSocialUser> friendList = new List<AGSSocialUser> (); #region ILocalUser implementation public void Authenticate(System.Action<bool> callback) { GameCircleSocial.Instance.RequestLocalPlayer (callback); Social.Active.Authenticate(this, callback); } public void LoadFriends(System.Action<bool> callback) { GameCircleSocial.Instance.RequestFriends (callback); } public IUserProfile[] friends { get { return friendList.ToArray(); } } public bool authenticated { get { return AGSPlayerClient.IsSignedIn(); } } public bool underage { get { AGSClient.LogGameCircleError("ILocalUser.underage.get is not available for GameCircle"); return false; } } #endregion }
What I have tried:
please tell me how to solve this error.
解决方案
Based on the Unity documentation for ILocalUser[^],Authenticate
has two signatures: one with anAction<bool>
argument (which you have), and another one with anAction<bool, string>
argument, which you don't have. Implement that one as well.
这篇关于Gamecirclesocial'没有实现接口成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文