SDK 版本:LeanCloud-Unity-SDK-20180703.3.zip
Unity版本:Unity2018.2.0f2
问题1:运行时报错
MissingMethodException: bool UnityEngine.Application.get_isWebPlayer()

问题2:使用以下代码注册时报错:
public void OnSignInClicked(){
var user = userName.text.Trim();
var pwd = password.text.Trim();
AVUser.LogInAsync(user, pwd).ContinueWith(t =>
{
if (t.IsFaulted || t.IsCanceled)
{
var error = t.Exception.Message; //
}
else
{
didSignedIn = true;
}
});
}

===========报错=================
NullReferenceException: Object reference not set to an instance of an object
LeanCloud.Core.Internal.AppRouterState.GetInitial (System.String appId, LeanCloud.AVClient+Configuration+AVRegion region) (at <5189819208ee40418e4484ce56713f7c>:0)
LeanCloud.Core.Internal.AppRouterController.Get () (at <5189819208ee40418e4484ce56713f7c>:0)
LeanCloud.Core.Internal.AVCommand..ctor (System.String relativeUri, System.String method, System.String sessionToken, System.Collections.Generic.IList1[T] headers, System.IO.Stream stream, System.String contentType) (at <5189819208ee40418e4484ce56713f7c>:0)
LeanCloud.Core.Internal.AVCommand..ctor (System.String relativeUri, System.String method, System.String sessionToken, System.Collections.Generic.IList
1[T] headers, System.Collections.Generic.IDictionary2[TKey,TValue] data) (at <5189819208ee40418e4484ce56713f7c>:0)
LeanCloud.Core.Internal.AVUserController.LogInAsync (System.String username, System.String password, System.Threading.CancellationToken cancellationToken) (at <5189819208ee40418e4484ce56713f7c>:0)
LeanCloud.AVUser.LogInAsync (System.String username, System.String password, System.Threading.CancellationToken cancellationToken) (at <5189819208ee40418e4484ce56713f7c>:0)
LeanCloud.AVUser.LogInAsync (System.String username, System.String password) (at <5189819208ee40418e4484ce56713f7c>:0)
SignIn.OnSignInClicked () (at Assets/Scripts/SignIn.cs:34)
UnityEngine.Events.InvokableCall.Invoke () (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:166)
UnityEngine.Events.UnityEvent.Invoke () (at C:/buildslave/unity/build/Runtime/Export/UnityEvent_0.cs:58)
UnityEngine.UI.Button.Press () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:36)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:45)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:50)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction
1[T1] functor) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:261)
UnityEngine.EventSystems.EventSystem:Update()

请问你的 App ID 是否配置正确
如果方便,可以简化一些工程发我一份。

这是百度网盘的工程下载链接:
链接:https://pan.baidu.com/s/19Vm4t0iz2DhXuJE5gOGw9Q 密码:68va

AppID配置没错,如下图,但是刚上传的工程里面把AppID修改掉了。

用Unity 2018.1.6f1 没有问题,但是我的实际的项目用Unity2018.2已经做了很多内容了,不容易再切换到旧版本的Unity上。希望LeanCloud的SDK可以解决最新版Unity的支持问题,非常感谢!!


我这边一直是用 Unity 2018.1.0f2 测试的,没想到又出了新版,我看一下

请替换一下这个 LeanCloud.Core.dll http://lc-eohx7l4e.cn-n1.lcfile.com/f90b717fac2dcae31d86.dll。7
稍后我们会评估后重新发新版本 sdk

好的,我试一下。非常感谢 thumbsup

初步测试没有问题,太棒了。非常感谢,要是平台有打赏功能,我请zyu喝杯咖啡 coffee

不客气,也感谢你发现了 Unity 新版的 bug。
Unity 最近更新有点快。