leancloud / unity-sdk

Unity SDK
MIT License
11 stars 1 forks source link

v20170223.1 not working with unity purchasing #9

Open cnsoft360 opened 7 years ago

cnsoft360 commented 7 years ago

重现方法. Unity 5.4.0f3 导入LeanCloud SDK 插件. 拖入AVInitializeBehaviour 开启Unity IAP 支持 并安装插件. ( Plugins下会有 UnityPurchasing 目录) 然后Editor 中点Play 就看到错误了. 如果不安装Unity IAP 不会有错误. 求破.

FileNotFoundException: Could not load file or assembly 'UnityEditor.Purchasing' or one of its dependencies. The system cannot find the file specified.
System.AppDomain.Load (System.Reflection.AssemblyName assemblyRef, System.Security.Policy.Evidence assemblySecurity) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/AppDomain.cs:692)
(wrapper remoting-invoke-with-check) System.AppDomain:Load (System.Reflection.AssemblyName,System.Security.Policy.Evidence)
System.AppDomain.Load (System.Reflection.AssemblyName assemblyRef) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/AppDomain.cs:657)
(wrapper remoting-invoke-with-check) System.AppDomain:Load (System.Reflection.AssemblyName)
System.Reflection.Assembly.Load (System.Reflection.AssemblyName assemblyRef) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/Assembly.cs:589)
AssemblyLister.Lister.DeepWalkReferences (System.Reflection.Assembly assembly, System.Collections.Generic.HashSet`1 seen)
AssemblyLister.Lister+<>c__DisplayClass1_0.<get_AllAssemblies>b__0 (System.Reflection.Assembly asm)
System.Linq.Enumerable+<CreateSelectManyIterator>c__Iterator12`2[System.Reflection.Assembly,System.Reflection.Assembly].MoveNext ()
System.Linq.Enumerable+<CreateSelectManyIterator>c__Iterator12`2[System.Reflection.Assembly,LeanCloud.Storage.Internal.AVModuleAttribute].MoveNext ()
System.Linq.Enumerable+<CreateSelectIterator>c__Iterator10`2[LeanCloud.Storage.Internal.AVModuleAttribute,System.Type].MoveNext ()
System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[System.Type].MoveNext ()
LeanCloud.Storage.Internal.AVModuleController.ScanForModules ()
LeanCloud.AVClient..cctor ()
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for LeanCloud.AVClient
LeanCloud.AVInitializeBehaviour.Initialize ()
LeanCloud.AVInitializeBehaviour.Awake ()
wujun4code commented 7 years ago

是这样的,你可以不引入 SDK 包含的那个 Unity.Engine.dll 这个库,因为你如果在 Unity 里面开发, Unity 会默认引入你当前版本的 Unity.Engine.dll ,这个是为了兼容旧版本的一个较早版本的 dll。

cnsoft360 commented 7 years ago

SDK里面没有Unity.Engine.dll这个啊. XD

leancloud_issue
wujun4code commented 7 years ago

或者你试试这个下载这边的 SDK Unity Realtime 这里面的代码比较新,这个是实时聊天的 SDK 它完全依赖了存储,因此你用存储是没问题的。

cnsoft360 commented 7 years ago

@wujun4code 试了Realtime的sdk 问题依旧.. 好尴尬啊

cnsoft360 commented 7 years ago

Up

wujun4code commented 7 years ago

您可以上传一下您依赖的 dll 么?打个包,我试试我这边如何触发这个 bug

cnsoft360 commented 7 years ago

@wujun4code 重现的步骤上面写的那样. 不开 IAP (不导入 Purchase ) 不会报错的 . 而开启 IAP 后会就报错了. 对比一下就是多了导入Unity Purchase插件后的插件目录. 是要5.4版的那个UnityEngine.Purchasing.dll 吗?

dongxue commented 6 years ago

@wujun4code 同样的问题啊,求解决方案啊