本文主要是介绍【Unity3D游戏开发】System.Collections.Generic.ICollection`1.CopyTo 错误 (二三),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
使用Unity,编辑器模式没有问题,iOS上报错误
System.Collections.Generic.ICollection`1.CopyTo
错误位置:
string[] receipts = PlayerPrefsEx.GetStringArray("unfinished_iap_receipt");
List<string> unFinIAPReceipts = new List<string>(receipts);
出错原因:
Most of Linq extension methods from Linq for Collections are not working with IEnumerables on iOS since they require AOT runtime compiler which is not supported.However there is a Linq for iOS library on Asset Store that is similar to Linq but doesn't require a runtime compiler. So you can use it on iOS and ToArray() method will work with this library.
这篇关于【Unity3D游戏开发】System.Collections.Generic.ICollection`1.CopyTo 错误 (二三)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!