首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在unity中访问google api

在unity中访问google api
EN

Stack Overflow用户
提问于 2013-07-24 17:41:37
回答 1查看 4.5K关注 0票数 1

我想在Unity3d中访问谷歌的API。我想在我的Unity3d应用程序中使用谷歌+应用程序接口,以便在应用程序中具有共享功能。如果你在Unity3d中使用谷歌的API,请帮助我。谢谢。

EN

回答 1

Stack Overflow用户

发布于 2013-07-29 11:27:04

这里有一个关于如何在C#/.NET上做这个here的详细解释,你最多只需要对代码做一些小的改动就可以让它与Mono一起工作了。需要注意的一点是,您必须包含此代码,以便告知Mono允许对API的请求。(source)

代码语言:javascript
复制
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。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17830380

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档