Skip to content

Commit 05b928b

Browse files
committed
Updated to app services to resolve #26. Also added readme documentation to resolve #14
1 parent fab762e commit 05b928b

18 files changed

+40
-56
lines changed
Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
# Azure Mobile Services for Unity3d
2-
For game developers looking to use Azure Mobile Services or Azure App Services in their Unity3D project.
1+
# Azure App Services for Unity3d
2+
For game developers looking to use Azure App Services (previously Mobile Services) in their Unity project.
33

4-
Also available as a [MobileServices Demo Project](https://github.com/Unity3dAzure/MobileServicesDemo) which will run inside UnityEditor and on iOS, Android and Windows. The demo project has got everything bundled in and does not require any additional assets to work. If you want to integrate with an existing Unity3d project then follow instructions below:
5-
6-
## How to add MobileServices into Unity3d project
4+
## How to setup App Services with a new Unity project
75
1. [Download UnityRestClient](https://github.com/ProjectStratus/UnityRestClient/archive/master.zip)
86
* Copy JsonFx 'plugins' and the UnityRestClient 'Source' into project `Assets` folder
9-
2. [Download MobileServices](https://github.com/Unity3dAzure/MobileServices/archive/master.zip)
10-
* Copy 'MobileServices' into project `Assets` folder.
11-
3. Create an [Azure Mobile Service](https://manage.windowsazure.com) or an [Azure App Service](https://portal.azure.com)
12-
* Create a table for app data.
7+
2. [Download AppServices](https://github.com/Unity3dAzure/AppServices/archive/master.zip)
8+
* Copy 'AppServices' into project `Assets` folder.
9+
3. Create an Azure App Service [Mobile App](https://portal.azure.com)
10+
* Create a Table (using Easy Tables) for app data.
11+
12+
## Unity 5 leaderboard demo
13+
[App Services Demo project](https://github.com/Unity3dAzure/AppServicesDemo) will run inside UnityEditor on Mac or Windows. (The demo project has got everything bundled in and does not require any additional assets to work.)
14+
Read developer guide on [using Azure App Services to create Unity highscores leaderboard](http://www.deadlyfingers.net/azure/azure-app-services-for-unity3d/) for detailed instructions.
1315

1416
## Supported Features
1517
### MobileServiceClient
@@ -49,7 +51,7 @@ using System.Net;
4951
using System.Collections.Generic;
5052
using RestSharp;
5153
using Pathfinding.Serialization.JsonFx;
52-
using Unity3dAzure.MobileServices;
54+
using Unity3dAzure.AppServices;
5355
5456
```
5557

@@ -60,7 +62,7 @@ private MobileServiceTable<TodoItem> _table;
6062

6163
```
6264
void Start () {
63-
_client = new MobileServiceClient(appUrl, appKey); // <- add your app connection strings here.
65+
_client = new MobileServiceClient(appUrl); // <- add your app url here.
6466
_table = _client.GetTable<TodoItem>("TodoItem");
6567
}
6668
```
@@ -84,4 +86,9 @@ private void OnReadItemsCompleted(IRestResponse<List<TodoItem>> response) {
8486
## Dependencies
8587
The REST service implements [UnityRestClient](https://github.com/ProjectStratus/UnityRestClient) which uses [JsonFx](https://bitbucket.org/TowerOfBricks/jsonfx-for-unity3d-git/) to parse JSON data.
8688

89+
## Supports
90+
* iOS
91+
* Android
92+
* Windows
93+
8794
Questions or tweet #Azure #GameDev [@deadlyfingers](https://twitter.com/deadlyfingers)

Assets/MobileServices/authentication/MobileServiceAuthenticationProvider.cs renamed to Assets/AppServices/authentication/MobileServiceAuthenticationProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Unity3dAzure.MobileServices
1+
namespace Unity3dAzure.AppServices
22
{
33
public enum MobileServiceAuthenticationProvider
44
{

Assets/MobileServices/client/IAzureMobileServiceClient.cs renamed to Assets/AppServices/client/IAzureMobileServiceClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System;
44
using RestSharp;
55

6-
namespace Unity3dAzure.MobileServices
6+
namespace Unity3dAzure.AppServices
77
{
88
public interface IAzureMobileServiceClient
99
{

Assets/MobileServices/client/MobileServiceClient.cs renamed to Assets/AppServices/client/MobileServiceClient.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using System.Net.Security;
1010
#endif
1111

12-
namespace Unity3dAzure.MobileServices
12+
namespace Unity3dAzure.AppServices
1313
{
1414
public class MobileServiceClient : RestClient, IAzureMobileServiceClient
1515
{
@@ -22,6 +22,7 @@ public class MobileServiceClient : RestClient, IAzureMobileServiceClient
2222

2323
/// <summary>
2424
/// Creates a new RestClient using Azure Mobile Service's Application Url and App Key
25+
/// NB: Mobile Services should be migrated to use Azure App Service with constructor below.
2526
/// </summary>
2627
public MobileServiceClient(string appUrl, string appKey) : base(appUrl)
2728
{
@@ -31,7 +32,7 @@ public MobileServiceClient(string appUrl, string appKey) : base(appUrl)
3132
// required for running in Windows and Android
3233
#if !NETFX_CORE || UNITY_ANDROID
3334
Debug.Log("ServerCertificateValidation");
34-
ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback;
35+
ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback;
3536
#endif
3637
}
3738

@@ -117,4 +118,4 @@ private bool RemoteCertificateValidationCallback(System.Object sender, X509Certi
117118
#endif
118119

119120
}
120-
}
121+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Collections;
33
using RestSharp;
44

5-
namespace Unity3dAzure.MobileServices
5+
namespace Unity3dAzure.AppServices
66
{
77
public class ZumoRequest : RestRequest
88
{

Assets/MobileServices/model/AccessToken.cs renamed to Assets/AppServices/model/AccessToken.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Unity3dAzure.MobileServices
1+
namespace Unity3dAzure.AppServices
22
{
33
public class AccessToken
44
{

Assets/MobileServices/model/MobileServiceUser.cs renamed to Assets/AppServices/model/MobileServiceUser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Unity3dAzure.MobileServices
1+
namespace Unity3dAzure.AppServices
22
{
33
public class MobileServiceUser
44
{

Assets/MobileServices/model/ResponseError.cs renamed to Assets/AppServices/model/ResponseError.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Unity3dAzure.MobileServices
1+
namespace Unity3dAzure.AppServices
22
{
33
public class ResponseError
44
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Unity3dAzure.MobileServices
1+
namespace Unity3dAzure.AppServices
22
{
33
public class User
44
{

0 commit comments

Comments
 (0)