Más contenido relacionado
La actualidad más candente (20)
Similar a UnityとAmazon Web Servicesで生み出す新しい価値 (20)
Más de Keisuke Nishitani (17)
UnityとAmazon Web Servicesで生み出す新しい価値
- 1. Amazon Data Service Japan K.K.
Solutions Architect
Keisuke Nishitani(@Keisuke69)
UnityとAmazon Web Services
で⽣生み出す新しい価値
- 9. AWS Mobile SDK for Unity
• クロスプラットフォームなゲーム開発環境として⼈人気の
⾼高いUnityのPlugin
– .NETベースのクラス群で構成
– Unityで書かれたゲームからAWSサービスをコールすることが簡単に
• 利利⽤用可能なサービス
– Amazon Cognito
– Amazon S3
– Amazon DynamoDB
– Amazon Mobile Analytics
– Amazon SNS
• Unity4.0以降降をサポート
- 10. AWS Mobile SDK for Unity
• サービスごとのUnityパッケージ
– aws-‐‑‒unity-‐‑‒sdk-‐‑‒dynamodb-‐‑‒x.x.x.x.unitypackage
– aws-‐‑‒unity-‐‑‒sdk-‐‑‒mobileanalytics-‐‑‒x.x.x.x.unitypackage
– aws-‐‑‒unity-‐‑‒sdk-‐‑‒s3-‐‑‒x.x.x.x.unitypackage
– aws-‐‑‒unity-‐‑‒sdk-‐‑‒cognitosync-‐‑‒x.x.x.x.unitypackage
• 必要なパッケージだけを導⼊入できる
- 16. サンプル:S3でオブジェクトを取得
private IAmazonS3 _s3Client;
private AWSCredentials _credentials;
private void GetObject() {
_credentials = new CognitoAWSCredentials(IdentityPoolId, RegionEndpoint.USEast1);
_s3Client = new AmazonS3Client(Credentials, RegionEndpoint.USEast1);
ResultText.text = string.Format("fetching {0} from bucket {1}”,SampleFileName,S3BucketName);
Client.GetObjectAsync(S3BucketName, SampleFileName, (responseObj) => {
string data = null;
var response = responseObj.Response;
if (response.ResponseStream != null){
using (StreamReader reader = new StreamReader(response.ResponseStream)){
data = reader.ReadToEnd();
}
ResultText.text += "n";
ResultText.text += data;
}
})
}