Skip to content

Commit 6996359

Browse files
committed
Merge pull request #13 from Unity3dAzure/iss12
Windows Unity Editor fix for Azure App Service. Fixes #12 and closes #11
2 parents 4e79e05 + 0fd97a6 commit 6996359

File tree

8 files changed

+40
-19
lines changed

8 files changed

+40
-19
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
[Oo]bj/
44
[Bb]uild/
55

6+
# Windows
7+
UWP/
8+
Assets/*.pfx
9+
610
# Autogenerated VS/MD solution and project files
711
*.csproj
812
*.unityproj

Assets/MobileServices/client/MobileServiceClient.cs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,19 @@ public MobileServiceClient(string appUrl, string appKey) : base(appUrl)
3535
#endif
3636
}
3737

38-
/// <summary>
39-
/// Creates a new RestClient using Azure App Service's Application Url
40-
/// </summary>
41-
public MobileServiceClient(string appUrl) : base(appUrl)
42-
{
43-
AppUrl = appUrl;
44-
}
38+
/// <summary>
39+
/// Creates a new RestClient using Azure App Service's Application Url
40+
/// </summary>
41+
public MobileServiceClient(string appUrl) : base(appUrl)
42+
{
43+
AppUrl = appUrl;
44+
45+
// required for running in Windows and Android
46+
#if !NETFX_CORE || UNITY_ANDROID
47+
Debug.Log("ServerCertificateValidation");
48+
ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback;
49+
#endif
50+
}
4551

4652
public override string ToString()
4753
{

Assets/Scenes/AppServicesDemo.unity

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ MonoBehaviour:
207207
m_GameObject: {fileID: 1578968900}
208208
m_Enabled: 1
209209
m_EditorHideFlags: 0
210-
m_Script: {fileID: 11500000, guid: a3d557396f6fa49b4ac8c50fc6a2d464, type: 3}
210+
m_Script: {fileID: 11500000, guid: 0b62d38dfdae51c4e9bea681efe27f2e, type: 3}
211211
m_Name:
212212
m_EditorClassIdentifier:
213-
_appUrl: PASTE_YOUR_APP_URL
214-
_facebookAccessToken: PASTE_YOUR_USER_TOKEN_HERE
213+
_appUrl:
214+
_facebookAccessToken:

Assets/Scenes/MobileServicesDemo.unity

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,12 @@ MonoBehaviour:
195195
m_GameObject: {fileID: 1558877018}
196196
m_Enabled: 1
197197
m_EditorHideFlags: 0
198-
m_Script: {fileID: 11500000, guid: 9cc5492013f234a658df4f11bee0303a, type: 3}
198+
m_Script: {fileID: 11500000, guid: 8340305ed59aebb49a582098c9d722a2, type: 3}
199199
m_Name:
200200
m_EditorClassIdentifier:
201-
_appUrl: PASTE_YOUR_APP_URL
202-
_appKey: PASTE_YOUR_APP_KEY
203-
_facebookAccessToken: PASTE_YOUR_USER_TOKEN_HERE
201+
_appUrl:
202+
_appKey:
203+
_facebookAccessToken:
204204
--- !u!4 &1558877020
205205
Transform:
206206
m_ObjectHideFlags: 0

ProjectSettings/EditorBuildSettings.asset

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ EditorBuildSettings:
55
m_ObjectHideFlags: 0
66
serializedVersion: 2
77
m_Scenes:
8-
- enabled: 1
9-
path: Assets/Scenes/MobileServicesDemo.unity
108
- enabled: 1
119
path: Assets/Scenes/AppServicesDemo.unity
10+
- enabled: 1
11+
path: Assets/Scenes/MobileServicesDemo.unity

ProjectSettings/ProjectSettings.asset

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ PlayerSettings:
337337
metroCertificatePassword:
338338
metroCertificateSubject: DefaultCompany
339339
metroCertificateIssuer: DefaultCompany
340-
metroCertificateNotAfter: 00cfb99ce6e8d101
340+
metroCertificateNotAfter: 00f3207df0b3d201
341341
metroApplicationDescription: MobileServicesDemo
342342
wsaImages: {}
343343
metroTileShortName:
@@ -353,19 +353,28 @@ PlayerSettings:
353353
metroSplashScreenUseBackgroundColor: 0
354354
platformCapabilities:
355355
WindowsStoreApps:
356+
AllJoyn: False
357+
BlockedChatMessages: False
358+
Bluetooth: False
359+
Chat: False
360+
CodeGeneration: False
356361
EnterpriseAuthentication: False
357362
HumanInterfaceDevice: False
358363
InternetClient: True
359364
InternetClientServer: False
360365
Location: False
361366
Microphone: False
362367
MusicLibrary: False
368+
Objects3D: False
369+
PhoneCall: False
363370
PicturesLibrary: False
364371
PrivateNetworkClientServer: False
365372
Proximity: False
366373
RemovableStorage: False
367374
SharedUserCertificates: False
375+
UserAccountInformation: False
368376
VideosLibrary: False
377+
VoipCall: False
369378
WebCam: False
370379
metroFTAName:
371380
metroFTAFileTypes: []

ProjectSettings/ProjectVersion.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
m_EditorVersion: 5.3.2f1
1+
m_EditorVersion: 5.3.4f1
22
m_StandardAssetsVersion: 0

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ function insert(item, user, request) {
5555
#### Highscores Table **Insert** script
5656
```node
5757
table.insert(function (context) {
58-
context.item.userId = context.user.id;
58+
if (context.user) {
59+
context.item.userId = context.user.id;
60+
}
5961
return context.execute();
6062
});
6163
```

0 commit comments

Comments
 (0)