我想在Unity3d中访问谷歌的API。我想在我的Unity3d应用程序中使用谷歌+应用程序接口,以便在应用程序中具有共享功能。如果你在Unity3d中使用谷歌的API,请帮助我。谢谢。
发布于 2013-07-29 11:27:04
这里有一个关于如何在C#/.NET上做这个here的详细解释,你最多只需要对代码做一些小的改动就可以让它与Mono一起工作了。需要注意的一点是,您必须包含此代码,以便告知Mono允许对API的请求。(source)
using System;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
public class UnsafeSecurityPolicy {
public static bool Validator(
object sender,
X509Certificate certificate,
X509Chain chain,
SslPolicyErrors policyErrors) {
//*** Just accept and move on...
Debug.Log ("Validation successful!");
return true;
}
public static void Instate() {
ServicePointManager.ServerCertificateValidationCallback = Validator;
}
}在开始使用API之前,您必须调用Instate。
https://stackoverflow.com/questions/17830380
复制相似问题